:root {
    /* Color Palette */
    --bg-navy: #000D1A;
    --bg-navy-dark: #00050a;
    --text-gold: #F7E7CE;
    --text-white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary-gold: #D4AF37;

    /* Typography */
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-navy);
    color: var(--text-white);
    font-family: var(--font-sans);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background & Overlay */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    /* Dim the image */
    filter: contrast(1.1) saturate(0.8);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-navy) 90%);
    z-index: 1;
}

/* Glassmorphism Header */
.glass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-gold);
    letter-spacing: 2px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 400;
    transition: color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav a:hover,
nav a.active {
    color: var(--text-gold);
}

/* Sections */
main {
    padding-top: 80px;
}

section {
    padding: 60px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

h2.section-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--text-gold);
    margin-bottom: 30px;
    border-left: 3px solid var(--primary-gold);
    padding-left: 15px;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 80px;
    margin-top: -80px;
    /* Counteract padding-top of main for Hero */
}

.hero-content {
    max-width: 800px;
    z-index: 10;
}

.subtitle {
    color: var(--primary-gold);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 20px;
    font-weight: 500;
}

.title {
    font-family: var(--font-serif);
    font-size: 5rem;
    color: var(--text-white);
    margin-bottom: 20px;
    line-height: 1.1;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.slogan {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 50px;
    font-weight: 300;
    letter-spacing: 1px;
}

.cta-button {
    background: transparent;
    border: 1px solid var(--primary-gold);
    color: var(--primary-gold);
    padding: 15px 40px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.4s ease;
    backdrop-filter: blur(4px);
}

.cta-button:hover {
    background: var(--primary-gold);
    color: var(--bg-navy);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* Director's Message (Pinned) */
.directors-message {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--primary-gold);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px;
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.notice-badge {
    background: var(--primary-gold);
    color: var(--bg-navy);
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 4px;
    margin-right: 20px;
    white-space: nowrap;
}

.notice-content {
    flex-grow: 1;
}

.notice-content h2 {
    font-size: 1.5rem;
    color: var(--text-white);
    margin-bottom: 5px;
}

.notice-content p {
    color: rgba(255, 255, 255, 0.8);
}

.notice-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-white);
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.notice-btn:hover {
    border-color: var(--primary-gold);
    color: var(--primary-gold);
}

/* Digital Archive (Netflix-style) */
.digital-archive-section {
    overflow: hidden;
    padding-bottom: 40px;
}

.archive-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 20px 0;
    scroll-behavior: smooth;
    /* Hide scrollbar */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.archive-container::-webkit-scrollbar {
    display: none;
}

.archive-card {
    min-width: 300px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
}

.archive-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.card-thumbnail {
    position: relative;
    height: 170px;
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--primary-gold);
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

.card-info {
    padding: 15px;
}

.card-info h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-white);
}

/* AP Dashboard */
.ap-dashboard-section {
    margin-bottom: 100px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.dashboard-grid.hidden {
    display: none;
}

.dashboard-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 25px;
    backdrop-filter: blur(12px);
}

.dashboard-card h3 {
    color: var(--text-gold);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.full-width {
    grid-column: 1 / -1;
}

/* Form Inputs */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.glass-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px;
    color: white;
    font-size: 1.1rem;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.3s;
}

.glass-input:focus {
    border-color: var(--primary-gold);
}

.gold-slider {
    width: 100%;
    accent-color: var(--primary-gold);
}

.update-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-gold);
    border: none;
    color: var(--bg-navy);
    font-weight: 700;
    cursor: pointer;
    border-radius: 6px;
    transition: opacity 0.3s;
}

.update-btn:hover {
    opacity: 0.9;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 180px;
    height: 40px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: .4s;
    border-radius: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

.toggle-label:before {
    position: absolute;
    content: "";
    height: 32px;
    width: 90px;
    /* Half width roughly */
    left: 4px;
    bottom: 3px;
    background-color: var(--primary-gold);
    transition: .4s;
    border-radius: 30px;
    z-index: 1;
}

input:checked+.toggle-label:before {
    transform: translateX(82px);
}

.toggle-text {
    z-index: 2;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-white);
    width: 50%;
    text-align: center;
}

input:not(:checked)+.toggle-label .toggle-text.admin {
    color: rgba(255, 255, 255, 0.5);
}

input:checked+.toggle-label .toggle-text.user {
    color: rgba(255, 255, 255, 0.5);
}

input:checked+.toggle-label .toggle-text.admin {
    color: var(--bg-navy);
}

input:not(:checked)+.toggle-label .toggle-text.user {
    color: var(--bg-navy);
}

/* Table */
.ranking-table {
    width: 100%;
    border-collapse: collapse;
    color: white;
}

.ranking-table th,
.ranking-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ranking-table th {
    color: var(--text-gold);
    font-weight: 500;
}

/* Modal */
.modal {
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: var(--bg-navy-dark);
    margin: 10% auto;
    padding: 20px;
    border: 1px solid var(--primary-gold);
    width: 80%;
    max-width: 800px;
    border-radius: 8px;
    position: relative;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary-gold);
    text-decoration: none;
    cursor: pointer;
}

.modal-iframe {
    width: 100%;
    height: 400px;
    border: none;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards ease-out;
}

.delay-1 {
    animation-delay: 0.3s;
}

.delay-2 {
    animation-delay: 0.6s;
}

.delay-3 {
    animation-delay: 0.9s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}