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

:root {
    --primary-color: #6B9FE8;
    --secondary-color: #9B7FCC;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f3eae1;
    --gray-color: #6b7280;
    --border-color: #e8dcd2;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f3eae1;
}

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

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 6rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #ff9966 0%, #ff8855 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 153, 102, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 153, 102, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

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

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

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

/* Features Section */
.features {
    padding: 5rem 0;
    background: var(--light-color);
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.feature-card p {
    color: var(--gray-color);
}

/* How It Works Section */
.how-it-works {
    padding: 5rem 0;
}

.how-it-works h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff9966 0%, #ff8855 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step h3 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.step p {
    color: var(--gray-color);
}

/* Forms */
.form-container {
    max-width: 500px;
    margin: 3rem auto;
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h1 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--gray-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background: linear-gradient(to right, #d1fae5, #ecfdf5);
    color: #065f46;
    border-left-color: #10b981;
}

.alert-error {
    background: linear-gradient(to right, #fee2e2, #fef2f2);
    color: #991b1b;
    border-left-color: #ef4444;
}

.alert-info {
    background: linear-gradient(to right, #dbeafe, #f0f9ff);
    color: #1e40af;
    border-left-color: #3b82f6;
}

.alert-warning {
    background: linear-gradient(to right, #fef3c7, #fefce8);
    color: #92400e;
    border-left-color: #f59e0b;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1.5rem;
    background: var(--light-color);
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    color: var(--dark-color);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background: var(--light-color);
    border-top: 1px solid var(--border-color);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.table thead {
    background: var(--light-color);
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-weight: 600;
    color: var(--dark-color);
}

/* Loading Spinner */
.loading {
    display: none;
    text-align: center;
    padding: 2rem;
}

.loading.active {
    display: block;
}

.spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid #ff9966;
    border-right: 4px solid #ff8855;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dashboard */
.dashboard {
    padding: 2rem 0;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-close {
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray-color);
    background: none;
    border: none;
}

/* Sidebar Navigation */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.5rem 0;
    overflow-y: auto;
    position: fixed;
    height: 100vh;
    top: 0;
    left: 0;
    transition: transform 0.3s ease;
    z-index: 999;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-brand-icon {
    font-size: 1.5rem;
}

.sidebar-menu {
    list-style: none;
    margin: 1rem 0;
    flex: 1;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.95rem;
}

.sidebar-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 2rem;
}

.sidebar-menu-item.active {
    background: rgba(255, 255, 255, 0.2);
    border-right: 4px solid white;
    padding-left: 1.5rem;
}

.sidebar-menu-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: center;
    text-indent: -9999px;
    overflow: hidden;
}

/* CSS SVG icons via data URI based on link href (no HTML changes needed) */
.sidebar-menu-item[href$="dashboard.html"] .sidebar-menu-icon {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='3' y='3' width='18' height='18' rx='2' fill='none' stroke='%23ffffff' stroke-width='1.5'/><path d='M7 15v-4' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' fill='none'/><path d='M12 15v-6' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' fill='none'/><path d='M17 15v-8' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' fill='none'/></svg>");
}
.sidebar-menu-item[href$="contests.html"] .sidebar-menu-icon,
.sidebar-menu-item[href$="all-contestants.html"] .sidebar-menu-icon {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2l2 4h4l-3 3 1 5-4-2-4 2 1-5-3-3h4z' fill='%23ffffff'/></svg>");
}
.sidebar-menu-item[href$="create-contest.html"] .sidebar-menu-icon {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z' fill='%23ffffff'/></svg>");
}
.sidebar-menu-item[href$="payments.html"] .sidebar-menu-icon {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='2' y='6' width='20' height='12' rx='2' fill='none' stroke='%23ffffff' stroke-width='1.4'/><circle cx='17' cy='12' r='2' fill='%23ffffff'/></svg>");
}
.sidebar-menu-item[href$="profile.html"] .sidebar-menu-icon {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='8' r='3' fill='%23ffffff'/><path d='M4 20c1.5-4 6-6 8-6s6.5 2 8 6' fill='none' stroke='%23ffffff' stroke-width='1.3' stroke-linecap='round'/></svg>");
}
.sidebar-menu-item[href$="logout.html"] .sidebar-menu-icon,
.sidebar-menu-item[href$="#"] .sidebar-menu-icon {
    /* generic logout/door icon for links that don't have a dedicated page */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M10 17l5-5-5-5' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/><path d='M19 21H9a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h10' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}

.sidebar-user {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: auto 0 0 0;
}

.sidebar-user-info {
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
}

.sidebar-user-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.sidebar-user-email {
    font-size: 0.8rem;
    opacity: 0.8;
}

.toggle-sidebar {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0;
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.toggle-sidebar:hover {
    transform: scale(1.1);
}

.main-content {
    flex: 1;
    margin-left: 280px;
    transition: margin-left 0.3s ease;
    background: var(--light-color);
    min-height: 100vh;
}

.main-content.sidebar-collapsed {
    margin-left: 0;
}

.top-header {
    background: white;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Hide navbar for logged-in pages */
.sidebar + .main-content ~ .navbar {
    display: none;
}

/* Responsive Sidebar */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
    }

    .sidebar.collapsed {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .toggle-sidebar {
        display: flex;
    }

    .top-header {
        padding: 1rem;
    }

    .top-header-left {
        gap: 0.5rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .nav-links {
        flex-direction: column;
        gap: 1rem;
    }

    .features h2,
    .how-it-works h2 {
        font-size: 2rem;
    }

    .form-container {
        padding: 2rem 1.5rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
    display: none !important;
}
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: inline-block;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

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

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

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

/* Features Section */
.features {
    padding: 5rem 0;
    background: var(--light-color);
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.feature-card p {
    color: var(--gray-color);
}

/* How It Works Section */
.how-it-works {
    padding: 5rem 0;
}

.how-it-works h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step h3 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.step p {
    color: var(--gray-color);
}

/* Forms */
.form-container {
    max-width: 500px;
    margin: 3rem auto;
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h1 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--gray-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1.5rem;
    background: var(--light-color);
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    color: var(--dark-color);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background: var(--light-color);
    border-top: 1px solid var(--border-color);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.table thead {
    background: var(--light-color);
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-weight: 600;
    color: var(--dark-color);
}

/* Loading Spinner */
.loading {
    display: none;
    text-align: center;
    padding: 2rem;
}

.loading.active {
    display: block;
}

.spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dashboard */
.dashboard {
    padding: 2rem 0;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-close {
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray-color);
    background: none;
    border: none;
}

/* Sidebar Navigation */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.5rem 0;
    overflow-y: auto;
    position: fixed;
    height: 100vh;
    top: 0;
    left: 0;
    transition: transform 0.3s ease;
    z-index: 999;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-brand-icon {
    font-size: 1.5rem;
}

.sidebar-menu {
    list-style: none;
    margin: 1rem 0;
    flex: 1;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.95rem;
}

.sidebar-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 2rem;
}

.sidebar-menu-item.active {
    background: rgba(255, 255, 255, 0.2);
    border-right: 4px solid white;
    padding-left: 1.5rem;
}

.sidebar-menu-icon {
    font-size: 1.3rem;
    width: 24px;
    text-align: center;
}

.sidebar-user {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: auto 0 0 0;
}

.sidebar-user-info {
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
}

.sidebar-user-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.sidebar-user-email {
    font-size: 0.8rem;
    opacity: 0.8;
}

.toggle-sidebar {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0;
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.toggle-sidebar:hover {
    transform: scale(1.1);
}

.main-content {
    flex: 1;
    margin-left: 280px;
    transition: margin-left 0.3s ease;
    background: var(--light-color);
    min-height: 100vh;
}

.main-content.sidebar-collapsed {
    margin-left: 0;
}

.top-header {
    background: white;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Hide navbar for logged-in pages */
.sidebar + .main-content ~ .navbar {
    display: none;
}

/* Responsive Sidebar */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
    }

    .sidebar.collapsed {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .toggle-sidebar {
        display: flex;
    }

    .top-header {
        padding: 1rem;
    }

    .top-header-left {
        gap: 0.5rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .nav-links {
        flex-direction: column;
        gap: 1rem;
    }

    .features h2,
    .how-it-works h2 {
        font-size: 2rem;
    }

    .form-container {
        padding: 2rem 1.5rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
    display: none !important;
}


/* // ...existing code... */

/* ---------- Featured Contestants (matches provided image) ---------- */
/* Uses project color variables when available to preserve theme */
.featured-section {
    padding: 80px 20px;
    background: var(--page-bg, #ffffff); /* keep existing page background */
    color: var(--text-color, #223047);
}

.featured-section .container {
    max-width: 1150px;
    margin: 0 auto;
    text-align: center;
}

.featured-section .eyebrow {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(107,159,232,0.12);
    color: var(--primary-color, #2f6fff);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
}

.featured-section h2 {
    margin: 6px 0 12px;
    font-size: 42px;
    line-height: 1.05;
    color: var(--heading-color, #17233a);
    font-weight: 800;
}

.featured-section p.lead {
    color: var(--muted-color, #6b7785);
    max-width: 760px;
    margin: 0 auto 36px;
    font-size: 16px;
}

/* Grid */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    align-items: start;
    margin-top: 26px;
}

/* Card */
.featured-card {
    background: var(--card-bg, #ffffff);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(24,39,75,0.06);
    text-align: left;
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease;
    position: relative;
}

.featured-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(24,39,75,0.09);
}

/* media / image area */
.featured-card .media {
    height: 220px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(15,22,38,0.04);
}

/* top badge */
.featured-card .badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 14px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* body */
.featured-card .card-body {
    padding: 20px 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 auto;
}

.featured-card h3 {
    margin: 0;
    font-size: 18px;
    color: var(--heading-color, #17233a);
    font-weight: 700;
}

.featured-card .meta {
    color: var(--muted-color, #6b7785);
    font-size: 13px;
    margin-top: 6px;
}

.featured-card .excerpt {
    color: var(--muted-color, #758294);
    font-size: 14px;
    margin-top: 10px;
    line-height: 1.5;
    flex: 1 1 auto;
}

/* bottom row: votes + CTA */
.featured-card .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.votes-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(47,111,255,0.06);
    color: var(--primary-color, #2f6fff);
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
}

.votes-pill .icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(24,39,75,0.06);
    color: var(--primary-color, #2f6fff);
}

/* Vote button */
.featured-card .btn-vote {
    background: linear-gradient(180deg, var(--primary-color, #2f6fff), var(--primary-color-dark, #2056d9));
    color: #fff;
    border: none;
    padding: 9px 14px;
    border-radius: 10px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(47,111,255,0.16);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.featured-card .btn-vote:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(47,111,255,0.25);
}

/* CTA centered under grid */
.featured-cta {
    margin-top: 36px;
    text-align: center;
}

.featured-cta .btn-view-all {
    background: var(--primary-color, #2f6fff);
    color: #fff;
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 10px 28px rgba(47,111,255,0.12);
    transition: all 0.3s ease;
}

.featured-cta .btn-view-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 38px rgba(47,111,255,0.2);
}

/* Responsive */
@media (max-width: 1024px) {
    .featured-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
}

@media (max-width: 640px) {
    .featured-section { padding: 48px 14px; }
    .featured-section h2 { font-size: 30px; }
    .featured-grid { grid-template-columns: 1fr; }
    .featured-card .media { height: 180px; }
    .featured-card { border-radius: 10px; }
    .featured-cta { margin-top: 22px; }
}

/* small utility to ensure clickable card image background can be set inline */
.featured-card .media[style] { background-repeat: no-repeat; }

/* End Featured Contestants block */

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

.btn-white:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
}

/* Contact Section */
.contact-section {
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.contact-section .container {
    max-width: 1200px;
}

.contact-header {
    text-align: center;
    margin-bottom: 50px;
}

.contact-header h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    font-weight: 800;
    color: white;
}

.contact-header p {
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.contact-form-wrapper {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

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

.contact-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.95rem;
}

.contact-form .form-control {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: inherit;
}

.contact-form .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(107, 159, 232, 0.1);
}

.contact-form button {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-white {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(107, 159, 232, 0.3);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 159, 232, 0.4);
}

.contact-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.info-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    transition: all 0.3s;
}

.info-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.info-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

.info-item h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.info-item p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Responsive Contact */
@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .contact-header h2 {
        font-size: 2rem;
    }

    .contact-form-wrapper {
        padding: 25px;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }

    .info-item {
        padding: 20px;
    }
}

/* End Contact Section */

// ...existing code...