/* ============================================
   MBTO Voting Application - Stylesheet
   Miss Bahamas Teen 2026
   ============================================ */

:root {
    --gold: #C9A84C;
    --gold-light: #E8D48B;
    --gold-dark: #A07D2E;
    --dark: #1A1A2E;
    --dark-lighter: #23234A;
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-500: #6B7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --teal: #0D9488;
    --teal-light: #14B8A6;
    --red: #DC2626;
    --green: #16A34A;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- NAVBAR ---- */
.navbar {
    background: var(--dark);
    padding: 0 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gold);
    text-decoration: none;
}

.nav-brand .crown {
    font-size: 1.5rem;
    margin-right: 4px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    color: var(--gray-200);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--gold-light);
}

.nav-user {
    color: var(--gold-light);
    font-size: 0.85rem;
    font-weight: 500;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--gold);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ---- BUTTONS ---- */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.25s ease;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 0.85rem;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--white);
    border-color: var(--gold);
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201, 168, 76, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--gold);
    border-color: var(--gold);
}

.btn-outline:hover {
    background: var(--gold);
    color: var(--dark);
}

.btn-teal {
    background: var(--teal);
    color: var(--white);
    border-color: var(--teal);
}

.btn-teal:hover {
    background: var(--teal-light);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
}

.btn-block {
    display: block;
    width: 100%;
}

/* ---- HERO SECTION ---- */
.hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-lighter) 50%, #1a2744 100%);
    color: var(--white);
    padding: 70px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(201, 168, 76, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--gold-light);
    position: relative;
}

.hero p {
    font-size: 1.15rem;
    color: var(--gray-300);
    max-width: 600px;
    margin: 0 auto 30px;
    position: relative;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    position: relative;
}

/* ---- STATS BAR ---- */
.stats-bar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 20px 0;
}

.stats-grid {
    display: flex;
    justify-content: center;
    gap: 50px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold-dark);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

/* ---- SECTION HEADINGS ---- */
.section-heading {
    text-align: center;
    margin-bottom: 40px;
}

.section-heading h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 8px;
}

.section-heading p {
    color: var(--gray-500);
    font-size: 1rem;
}

/* ---- CONTESTANT GRID ---- */
.contestants-section {
    padding: 60px 0;
}

.contestants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.contestant-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.contestant-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.contestant-photo {
    width: 100%;
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, var(--gray-200), var(--gray-100));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.contestant-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--gray-500);
}

.photo-placeholder .icon {
    font-size: 3rem;
    opacity: 0.5;
}

.photo-placeholder span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contestant-info {
    padding: 16px;
    text-align: center;
}

.contestant-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 4px;
}

.contestant-info .island {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 10px;
}

.vote-count-bar {
    background: var(--gray-100);
    border-radius: 20px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 6px;
}

.vote-count-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 20px;
    transition: width 0.6s ease;
}

.vote-percentage {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold-dark);
}

.vote-btn {
    margin-top: 10px;
    padding: 8px 20px;
    font-size: 0.85rem;
}

.voted-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 14px;
    background: var(--green);
    color: var(--white);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ---- FORMS ---- */
.form-section {
    padding: 60px 0;
    display: flex;
    justify-content: center;
}

.form-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    width: 100%;
    max-width: 460px;
}

.form-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--dark);
    text-align: center;
    margin-bottom: 8px;
}

.form-card .subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

.form-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--gray-500);
}

.form-footer a {
    color: var(--gold-dark);
    font-weight: 600;
    text-decoration: none;
}

/* ---- ALERTS ---- */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-success {
    background: #DCFCE7;
    color: #166534;
    border: 1px solid #BBF7D0;
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.alert-info {
    background: #DBEAFE;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

/* ---- ADMIN PANEL ---- */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 64px);
}

.admin-sidebar {
    width: 240px;
    background: var(--dark);
    padding: 30px 0;
    flex-shrink: 0;
}

.admin-sidebar a {
    display: block;
    padding: 12px 24px;
    color: var(--gray-300);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: var(--dark-lighter);
    color: var(--gold);
    border-left: 3px solid var(--gold);
}

.admin-content {
    flex: 1;
    padding: 30px;
}

.admin-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 24px;
}

/* ---- TABLES ---- */
.data-table {
    width: 100%;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border-collapse: collapse;
}

.data-table th {
    background: var(--dark);
    color: var(--gold-light);
    padding: 14px 16px;
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9rem;
}

.data-table tr:hover {
    background: var(--gray-50);
}

.table-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold);
}

.table-photo-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--gray-500);
    border: 2px solid var(--gold);
}

.action-btns {
    display: flex;
    gap: 8px;
}

.action-btns .btn {
    padding: 5px 12px;
    font-size: 0.8rem;
}

/* ---- FOOTER ---- */
.footer {
    background: var(--dark);
    color: var(--gray-500);
    text-align: center;
    padding: 24px 0;
    font-size: 0.85rem;
    margin-top: auto;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--dark);
        flex-direction: column;
        padding: 20px;
        gap: 12px;
        border-top: 1px solid var(--dark-lighter);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .stats-grid {
        gap: 24px;
    }

    .contestants-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }

    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        padding: 10px 0;
        display: flex;
        overflow-x: auto;
    }

    .admin-sidebar a {
        white-space: nowrap;
    }
}
