/* Digital Club - Tech-Themed CSS */

/* Enhanced CSS Variables */
:root {
    --primary-color: #00ffff;
    --secondary-color: #ff00ff;
    --accent-color: #ffff00;
    --success-color: #00ff00;
    --warning-color: #ffaa00;
    --error-color: #ff0000;
    --info-color: #00aaff;
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --bg-quaternary: #0f1419;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --border-color: rgba(0, 255, 255, 0.2);
    --shadow-color: rgba(0, 255, 255, 0.3);
    --shadow-hover: rgba(0, 255, 255, 0.5);
    --gradient-primary: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    --gradient-secondary: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    --gradient-accent: linear-gradient(45deg, var(--accent-color), var(--primary-color));
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --border-radius-sm: 8px;
    --border-radius-md: 15px;
    --border-radius-lg: 25px;
    --border-radius-xl: 50px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

* {
    box-sizing: border-box;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

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

/* Containers by breakpoint */
@media (min-width: 1280px) { .container { max-width: 1200px; } }
@media (min-width: 1024px) and (max-width: 1279px) { .container { max-width: 1024px; } }
@media (min-width: 768px) and (max-width: 1023px) { .container { max-width: 768px; padding: 0 1.5rem; } }
@media (max-width: 767px) { .container { max-width: 100%; padding: 0 1rem; } }

/* Grid utilities */
.row { display: flex; flex-wrap: wrap; margin-left: -0.75rem; margin-right: -0.75rem; }
[class*="col-"] { padding-left: 0.75rem; padding-right: 0.75rem; box-sizing: border-box; }
.col-12 { width: 100%; }
.col-6 { width: 50%; }
.col-4 { width: 33.3333%; }
.col-3 { width: 25%; }
@media (max-width: 1023px) { .md-col-12 { width: 100%; } .md-col-6 { width: 50%; } }
@media (max-width: 767px) { .sm-col-12 { width: 100%; } .sm-col-6 { width: 50%; } .sm-col-4 { width: 33.3333%; } }

/* Spacing utilities (subset) */
.mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; } .mt-3 { margin-top: 0.75rem; } .mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; } .mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 0.75rem; } .mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; }
.pt-4 { padding-top: 1rem; } .pb-4 { padding-bottom: 1rem; }
@media (max-width: 767px) { .sm-mb-4 { margin-bottom: 1rem; } .sm-mt-4 { margin-top: 1rem; } }

/* Media helpers */
img, video { max-width: 100%; height: auto; }
.img-fluid { max-width: 100%; height: auto; display: block; }
.ratio { position: relative; width: 100%; }
.ratio::before { display: block; content: ""; }
.ratio-16x9::before { padding-top: 56.25%; }
.ratio-4x3::before { padding-top: 75%; }
.ratio > * { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* Responsive tables */
@media (max-width: 768px) {
    table { display: block; width: 100%; overflow-x: auto; border-spacing: 0; }
    thead { position: sticky; top: 0; z-index: 1; }
}

/* Enhanced Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Fira Code', monospace;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 600;
}

p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-glow {
    text-shadow: 0 0 20px var(--primary-color);
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    z-index: 10000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    overflow: visible;
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

.nav-link:focus-visible,
.dropdown-item:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.35);
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.5;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    overflow: visible;
}

.nav-logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--primary-color);
    font-family: 'Fira Code', monospace;
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-img {
    height: 5.5rem;
    width: auto;
    filter: drop-shadow(0 0 10px var(--primary-color));
    transition: var(--transition-normal);
}

.logo-img:hover {
    filter: drop-shadow(0 0 15px var(--primary-color)) brightness(1.2);
    transform: scale(1.05);
}

.nav-logo i {
    font-size: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 3rem;
    flex: 1;
    justify-content: space-between;
    overflow: visible;
}

/* Navigation Groups */
.nav-main {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    overflow: visible;
}

.nav-user {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-left: auto;
}

/* Dropdown Navigation */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-toggle i.fa-chevron-down {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

/* Remove Bootstrap caret to avoid double arrow on dropdown toggles */
.dropdown-toggle::after { display: none !important; content: none !important; }

.nav-dropdown:hover .dropdown-toggle i.fa-chevron-down {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10000;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    display: block;
    pointer-events: none;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-dropdown.active .dropdown-toggle i.fa-chevron-down {
    transform: rotate(180deg);
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--border-color);
}

.dropdown-menu::after {
    display: none;
    content: '';
    position: absolute;
    top: -7px;
    left: 21px;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid rgba(10, 10, 10, 0.98);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.95rem;
}

/* Center dropdown items' content */
.dropdown-menu .dropdown-item { justify-content: center; text-align: center; }
.dropdown-menu .dropdown-item:hover { padding-left: 1.5rem; }

.dropdown-item:hover {
    background: rgba(0, 255, 255, 0.1);
    color: var(--primary-color);
    padding-left: 2rem;
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    font-size: 0.9rem;
}

.dropdown-item span {
    flex: 1;
}

/* User Dropdown Specific Styles */
.user-dropdown .dropdown-menu {
    right: 0;
    left: auto;
    min-width: 200px;
}

.user-dropdown .dropdown-menu::before {
    left: auto;
    right: 20px;
}

.user-dropdown .dropdown-menu::after {
    left: auto;
    right: 21px;
}

.user-menu .dropdown-item {
    padding: 0.7rem 1.2rem;
}

.user-menu .dropdown-item.admin {
    color: var(--secondary-color);
}

.user-menu .dropdown-item.admin:hover {
    background: rgba(255, 0, 255, 0.1);
    color: var(--secondary-color);
}

.user-menu .dropdown-item.logout {
    color: var(--error-color);
}

.user-menu .dropdown-item.logout:hover {
    background: rgba(255, 0, 0, 0.1);
    color: var(--error-color);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
    opacity: 0.5;
}

/* Navigation Links */
.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(0, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::before {
    width: 80%;
}

/* Ensure sufficient link contrast */
a, .nav-link { color: var(--text-primary); }
a:hover, .nav-link:hover { color: var(--primary-color); }

/* Secondary Navigation Links */
.nav-link.secondary {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
    opacity: 0.7;
}

.nav-link.secondary:hover {
    opacity: 1;
}

/* User Action Links */
.nav-link.user-action {
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.nav-link.user-action:hover {
    background: rgba(0, 255, 255, 0.15);
    border-color: var(--primary-color);
}

.nav-link.user-action.login {
    background: rgba(0, 255, 0, 0.1);
    border-color: rgba(0, 255, 0, 0.3);
}

.nav-link.user-action.login:hover {
    background: rgba(0, 255, 0, 0.2);
    border-color: #00ff00;
}

.nav-link.user-action.register {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--bg-primary);
    border: none;
}

.nav-link.user-action.register:hover {
    background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.nav-link.user-action.admin {
    background: rgba(255, 0, 255, 0.1);
    border-color: rgba(255, 0, 255, 0.3);
}

.nav-link.user-action.admin:hover {
    background: rgba(255, 0, 255, 0.2);
    border-color: var(--secondary-color);
}

.nav-link.user-action.logout {
    background: rgba(255, 0, 0, 0.1);
    border-color: rgba(255, 0, 0, 0.3);
}

.nav-link.user-action.logout:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: #ff0000;
}

/* Active Navigation State */
.nav-link.active {
    color: var(--primary-color);
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.nav-link.active::before {
    width: 80%;
}

/* Navigation Separator */
.nav-separator {
    width: 1px;
    height: 30px;
    background: var(--border-color);
    margin: 0 1rem;
    opacity: 0.5;
}

/* Navigation Group Labels */
.nav-group-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Enhanced Mobile Navigation */
@media (max-width: 768px) {
    .nav-group-label {
        display: block;
        text-align: center;
        margin: 1rem 0 0.5rem 0;
        padding: 0 2rem;
    }
    
    .nav-main::before {
        content: 'Main';
        font-size: 0.7rem;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-bottom: 0.5rem;
        font-weight: 600;
        display: block;
        text-align: center;
        padding: 0 2rem;
    }
    
    .nav-secondary::before {
        content: 'More';
        font-size: 0.7rem;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-bottom: 0.5rem;
        font-weight: 600;
        display: block;
        text-align: center;
        padding: 0 2rem;
    }
    
    
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

/* Hide close button by default (desktop) */
.nav-close { display: none; }

.bar {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 80px;
    right: 2rem;
    z-index: 10001;
    max-width: 400px;
}

@media (max-width: 768px) {
    .flash-messages {
        top: 80px;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

.flash-message {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.flash-success {
    background: rgba(0, 255, 0, 0.1);
    border-color: #00ff00;
    color: #00ff00;
}

.flash-error {
    background: rgba(255, 0, 0, 0.1);
    border-color: #ff0000;
    color: #ff0000;
}

.flash-warning {
    background: rgba(255, 255, 0, 0.1);
    border-color: #ffff00;
    color: #ffff00;
}

.flash-info {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.flash-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    margin-left: 1rem;
}

/* Main Content */
.main-content {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
}

/* Enhanced Buttons */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius-xl);
    color: var(--bg-primary);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--shadow-hover);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--shadow-color);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left var(--transition-slow);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    padding: 1rem 2rem;
    border-radius: var(--border-radius-xl);
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-normal);
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--bg-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.btn-secondary:active {
    transform: translateY(-1px);
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--primary-color);
    transition: width var(--transition-normal);
    z-index: -1;
}

.btn-secondary:hover::before {
    width: 100%;
}

/* Button Variants */
.btn-success {
    background: var(--success-color);
    border-color: var(--success-color);
    color: var(--bg-primary);
}

.btn-warning {
    background: var(--warning-color);
    border-color: var(--warning-color);
    color: var(--bg-primary);
}

.btn-error {
    background: var(--error-color);
    border-color: var(--error-color);
    color: var(--bg-primary);
}

.btn-info {
    background: var(--info-color);
    border-color: var(--info-color);
    color: var(--bg-primary);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--text-secondary);
    color: var(--text-secondary);
}

.btn-outline:hover {
    background: var(--text-secondary);
    color: var(--bg-primary);
    border-color: var(--text-secondary);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Button Sizes */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: var(--border-radius-lg);
    min-height: 36px;
}

.btn-lg {
    padding: 1.5rem 3rem;
    font-size: 1.2rem;
    border-radius: var(--border-radius-xl);
    min-height: 52px;
}

.btn-xl {
    padding: 2rem 4rem;
    font-size: 1.4rem;
    border-radius: var(--border-radius-xl);
    min-height: 64px;
}

@media (max-width: 768px) {
    .btn-primary,
    .btn-secondary {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        min-height: 44px;
    }

    .btn-lg {
        padding: 1rem 2rem;
        font-size: 1.1rem;
        min-height: 48px;
    }

    .btn-xl {
        padding: 1.25rem 2.5rem;
        font-size: 1.2rem;
        min-height: 52px;
    }
}

/* Button Groups */
.btn-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-group .btn-primary,
.btn-group .btn-secondary {
    flex: 1;
    min-width: 120px;
}

/* Enhanced Cards */
.card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-md);
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

@media (hover: hover) and (pointer: fine) {
.card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px var(--shadow-color);
}

.card:hover::before {
    opacity: 1;
    }
}

@media (max-width: 768px) {
    .card {
        padding: 1.5rem;
    }

    .card-interactive:active {
        transform: scale(0.98);
    }
}

.card-elevated {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card-elevated:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.card-interactive {
    cursor: pointer;
}

.card-interactive:hover {
    transform: translateY(-5px) scale(1.02);
}

.card-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-gradient {
    background: var(--gradient-secondary);
    border: none;
}

.card-outlined {
    background: transparent;
    border: 2px solid var(--border-color);
}

.card-outlined:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-color);
}

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

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

.form-control {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    min-height: 44px;
}

@media (max-width: 768px) {
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.875rem 1rem;
        min-height: 44px;
    }

    textarea.form-control {
        min-height: 120px;
    }
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px var(--shadow-color);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* Enhanced Select Field Styling */
.form-select,
select {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    transition: all var(--transition-normal);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2300ffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 3rem;
}

.form-select:hover,
select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--shadow-color);
    background-color: rgba(0, 0, 0, 0.4);
}

.form-select:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px var(--shadow-color);
    background-color: rgba(0, 0, 0, 0.4);
}

.form-select option,
select option {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.75rem;
    border: none;
    font-weight: 500;
}

.form-select option:hover,
select option:hover {
    background-color: var(--bg-tertiary);
    color: var(--primary-color);
}

.form-select option:checked,
select option:checked {
    background-color: var(--primary-color);
    color: var(--bg-primary);
    font-weight: 600;
}

/* Large select fields */
.form-select-lg,
select.form-control-lg {
    padding: 1.25rem;
    font-size: 1.1rem;
    padding-right: 3.5rem;
    background-size: 1.25rem;
    background-position: right 1.25rem center;
}

/* Small select fields */
.form-select-sm,
select.form-control-sm {
    padding: 0.75rem;
    font-size: 0.9rem;
    padding-right: 2.5rem;
    background-size: 0.875rem;
    background-position: right 0.75rem center;
}

/* Disabled state */
.form-select:disabled,
select:disabled {
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23888888' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
}

/* Invalid state */
.form-select.is-invalid,
select.is-invalid {
    border-color: var(--error-color);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}

.form-select.is-invalid:focus,
select.is-invalid:focus {
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

/* Valid state */
.form-select.is-valid,
select.is-valid {
    border-color: var(--success-color);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.form-select.is-valid:focus,
select.is-valid:focus {
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

/* Mobile-specific select improvements */
@media (max-width: 767.98px) {
    .form-select,
    select {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px; /* iOS recommended touch target */
        padding: 0.875rem;
        padding-right: 2.75rem;
    }
    
    .form-select-lg,
    select.form-control-lg {
        font-size: 16px;
        padding: 1rem;
        padding-right: 3rem;
        min-height: 48px;
    }
    
    .form-select-sm,
    select.form-control-sm {
        font-size: 16px;
        padding: 0.75rem;
        padding-right: 2.5rem;
        min-height: 40px;
    }
}

/* Dark theme dropdown improvements */
@media (prefers-color-scheme: dark) {
    .form-select option,
    select option {
        background-color: var(--bg-secondary);
        color: var(--text-primary);
    }
    
    .form-select option:hover,
    select option:hover {
        background-color: var(--bg-tertiary);
        color: var(--primary-color);
    }
}

/* Ensure readable inputs across themes and autofill */
input, select, textarea {
    color: var(--text-primary);
    background-color: rgba(0, 0, 0, 0.3);
    caret-color: var(--primary-color);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    /* Force dark background + bright text for browser autofill */
    -webkit-text-fill-color: var(--text-primary) !important;
    box-shadow: 0 0 0px 1000px rgba(0, 0, 0, 0.6) inset !important;
    background-color: rgba(0, 0, 0, 0.6) !important;
    border-color: var(--primary-color) !important;
    transition: background-color 99999s ease-in-out 0s;
}

/* Table responsive utility */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Accessible tables on dark background */
.table {
    color: var(--text-primary);
    background-color: transparent;
}

.table thead th {
    color: var(--text-primary);
    border-color: var(--border-color);
}

.table tbody td,
.table tbody th {
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Ensure badge/text contrast on warnings */
.badge.bg-warning,
.badge.text-bg-warning {
    color: #000;
}

/* Membership page scoped styles */
.membership-page .page-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.membership-page .section-title {
    color: var(--text-primary);
}

.membership-page .status-card {
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.04);
}

.membership-page .status-icon {
    font-size: 4.5rem;
}

.membership-page .status-icon-success { color: #22c55e; }
.membership-page .status-icon-warning { color: #f59e0b; }
.membership-page .status-icon-muted { color: var(--text-muted); }

.membership-page .chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.membership-page .chip-success { background: rgba(34, 197, 94, 0.15); color: #22c55e; border-color: rgba(34, 197, 94, 0.35); }
.membership-page .chip-warning { background: rgba(245, 158, 11, 0.2); color: #111; border-color: rgba(245, 158, 11, 0.5); }
.membership-page .chip-info { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border-color: rgba(56, 189, 248, 0.35); }
.membership-page .chip-muted { background: rgba(255, 255, 255, 0.06); color: var(--text-secondary); border-color: rgba(255, 255, 255, 0.15); }

.membership-page .chip-success-outline { color: #22c55e; border-color: rgba(34, 197, 94, 0.5); }
.membership-page .chip-warning-outline { color: #f59e0b; border-color: rgba(245, 158, 11, 0.5); background: rgba(245, 158, 11, 0.12); }
.membership-page .chip-muted-outline { color: var(--text-secondary); border-color: rgba(255, 255, 255, 0.2); }

.membership-page .info-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.membership-page .info-list .label {
    color: var(--text-muted);
    margin-right: 0.75rem;
}

.membership-page .info-list .value {
    color: var(--text-primary);
    font-weight: 600;
}

.membership-page .info-list li {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
    padding-bottom: 0.4rem;
}

.membership-page .callout {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.04);
}

.membership-page .callout-title { font-weight: 700; color: var(--text-primary); }
.membership-page .callout-text { color: var(--text-secondary); }
.membership-page .callout-hint { color: var(--text-muted); font-size: 0.9rem; }

.membership-page .callout-success { border-color: rgba(34, 197, 94, 0.5); background: rgba(34, 197, 94, 0.12); }
.membership-page .callout-warning { border-color: rgba(245, 158, 11, 0.5); background: rgba(245, 158, 11, 0.12); }
.membership-page .callout-info { border-color: rgba(56, 189, 248, 0.5); background: rgba(56, 189, 248, 0.12); }

.membership-page .bullets {
    list-style: disc;
    padding-left: 1.25rem;
}

.membership-page .text-strong { font-weight: 700; color: var(--text-primary); }

/* Payment history table specific styles */
.membership-page .table-responsive {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.membership-page .table {
    margin-bottom: 0;
    background: rgba(255, 255, 255, 0.05);
}

.membership-page .table thead th {
    background: rgba(0, 255, 255, 0.1);
    color: var(--text-primary);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    padding: 1rem 0.75rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.membership-page .table tbody td {
    color: var(--text-secondary);
    padding: 1rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: middle;
}

.membership-page .table tbody tr {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

.membership-page .table.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.06) !important;
}

.membership-page .table.table-striped > tbody > tr:nth-of-type(even) {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

.membership-page .table tbody tr:hover {
    background: rgba(0, 255, 255, 0.05);
}

.membership-page .table tbody tr:last-child td {
    border-bottom: none;
}

.membership-page .table tbody td strong {
    color: var(--text-primary);
    font-weight: 700;
}

@media (max-width: 768px) {
    .membership-page .status-icon { font-size: 3.8rem; }
    
    .membership-page .table thead th,
    .membership-page .table tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .membership-page .table thead th {
        font-size: 0.8rem;
    }
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1rem;
    margin-top: 5rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo-img {
    height: 6.5rem;
    width: auto;
    filter: drop-shadow(0 0 20px var(--primary-color));
}

.footer-logo h3 {
    margin-bottom: 0;
    font-size: 1.5rem;
}

.footer-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-color);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Newsletter Form */
.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    outline: none;
}

.newsletter-form button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    background: var(--primary-color);
    color: var(--bg-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 2rem;
    }
    
    .nav-main {
        gap: 1rem;
    }
    
    .nav-secondary {
        gap: 0.8rem;
    }
    
    .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .nav-link.secondary {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
}

/* Modern Mobile Navigation - Slide-in Sidebar */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    /* Modern slide-in sidebar from right */
    .nav-menu {
        position: fixed;
        right: -100%;
        top: 0;
        width: 85%;
        max-width: 400px;
        height: 100vh;
        display: flex;
        flex-direction: column;
        background: linear-gradient(135deg, rgba(10, 10, 10, 0.98) 0%, rgba(26, 26, 46, 0.98) 100%);
        backdrop-filter: blur(20px);
        border-left: 1px solid var(--border-color);
        box-shadow: -10px 0 50px rgba(0, 0, 0, 0.5);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 0;
        gap: 0;
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 10001;
        -webkit-overflow-scrolling: touch;
    }

    .nav-menu.active {
        right: 0;
    }
    
    .nav-main,
    .nav-user {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        padding: 1.5rem;
    }
    
    .nav-main {
        border-bottom: 1px solid var(--border-color);
        padding: 1.5rem;
        padding-top: 4rem;
        margin-bottom: 0;
        flex: 1;
        overflow-y: auto;
        min-height: 0;
    }
    
    .nav-user {
        margin-left: 0;
        gap: 0.8rem;
        padding: 1.5rem;
        border-top: 1px solid var(--border-color);
        margin-top: auto;
        flex-shrink: 0;
    }

    .nav-list {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 1rem 1.25rem;
        font-size: 1rem;
        border-radius: 12px;
        margin: 0.25rem 0;
        min-height: 44px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        color: var(--text-secondary);
    }

    .nav-link::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 0;
        background: var(--primary-color);
        border-radius: 0 3px 3px 0;
        transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-link:hover {
        color: var(--primary-color);
        background: rgba(0, 255, 255, 0.1);
    }

    .nav-link:hover::before {
        height: 60%;
    }

    .nav-link:active,
    .nav-link:focus {
        color: var(--primary-color);
        transform: scale(0.98);
        background: rgba(0, 255, 255, 0.15);
    }

    .nav-link:active::before,
    .nav-link:focus::before {
        height: 60%;
    }
    
    .nav-link.user-action {
        font-size: 1rem;
        padding: 1rem 1.25rem;
        justify-content: center;
        min-height: 44px;
        margin: 0.5rem 0;
    }

    .nav-link.user-action:hover {
        color: var(--primary-color);
    }

    .nav-link.user-action.login {
        background: rgba(0, 255, 0, 0.1);
        border: 1px solid rgba(0, 255, 0, 0.3);
        color: var(--success-color);
    }

    .nav-link.user-action.login:hover {
        background: rgba(0, 255, 0, 0.2);
        border-color: var(--success-color);
        color: var(--success-color);
    }

    .nav-link.user-action.register {
        background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
        color: var(--bg-primary);
        border: none;
    }

    .nav-link.user-action.register:hover {
        background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
        color: var(--bg-primary);
    }

    .nav-link.user-action.admin {
        background: rgba(255, 0, 255, 0.1);
        border: 1px solid rgba(255, 0, 255, 0.3);
        color: var(--secondary-color);
    }

    .nav-link.user-action.admin:hover {
        background: rgba(255, 0, 255, 0.2);
        border-color: var(--secondary-color);
        color: var(--secondary-color);
    }

    .nav-link.user-action.logout {
        background: rgba(255, 0, 0, 0.1);
        border: 1px solid rgba(255, 0, 0, 0.3);
        color: var(--error-color);
    }

    .nav-link.user-action.logout:hover {
        background: rgba(255, 0, 0, 0.2);
        border-color: var(--error-color);
        color: var(--error-color);
    }

    /* Mobile Dropdown Styles - Accordion */
    .nav-dropdown {
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    .nav-dropdown .dropdown-toggle {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 1.25rem;
        font-size: 1rem;
        border-radius: 12px;
        margin: 0.25rem 0;
        min-height: 44px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        background: transparent;
        border: none;
        color: var(--text-secondary);
        text-align: left;
        cursor: pointer;
        position: relative;
    }

    .nav-dropdown .dropdown-toggle:hover {
        color: var(--primary-color);
        background: rgba(0, 255, 255, 0.1);
    }

    .nav-dropdown .dropdown-toggle:focus {
        color: var(--primary-color);
        background: rgba(0, 255, 255, 0.1);
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }

    .nav-dropdown .dropdown-toggle:active {
        color: var(--primary-color);
        transform: scale(0.98);
        background: rgba(0, 255, 255, 0.15);
    }

    .nav-dropdown .dropdown-toggle i.fa-chevron-down {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        margin-left: auto;
        font-size: 0.875rem;
    }

    .nav-dropdown.active .dropdown-toggle {
        color: var(--primary-color);
        background: rgba(0, 255, 255, 0.1);
    }

    .nav-dropdown.active .dropdown-toggle i.fa-chevron-down {
        transform: rotate(180deg);
    }

    .nav-dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(0, 0, 0, 0.3);
        border: none;
        border-radius: 0;
        box-shadow: none;
        margin: 0;
        padding: 0;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        list-style: none;
    }

    .nav-dropdown.active .dropdown-menu {
        max-height: 600px;
        padding: 0.5rem 0;
        margin-top: 0.5rem;
    }

    .dropdown-menu::before,
    .dropdown-menu::after {
        display: none;
    }

    .dropdown-item {
        padding: 0.875rem 1.25rem 0.875rem 2.75rem;
        font-size: 0.95rem;
        border-radius: 8px;
        margin: 0.15rem 0.5rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        color: var(--text-secondary);
        text-decoration: none;
    }

    .dropdown-item i {
        width: 18px;
        text-align: center;
        font-size: 0.9rem;
        color: var(--primary-color);
        opacity: 0.7;
    }

    .dropdown-item:hover,
    .dropdown-item:focus {
        color: var(--primary-color);
        background: rgba(0, 255, 255, 0.1);
        transform: translateX(4px);
    }

    .dropdown-item:active {
        color: var(--primary-color);
        transform: translateX(4px) scale(0.98);
        background: rgba(0, 255, 255, 0.15);
    }

    .user-dropdown .dropdown-menu {
        right: auto;
        left: auto;
    }

    /* Enhanced hamburger animation */
    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 44px;
        height: 44px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 10002;
        transition: transform 0.3s ease;
    }

    .nav-toggle:active {
        transform: scale(0.95);
    }

    .nav-toggle .bar {
        width: 28px;
        height: 3px;
        background: var(--primary-color);
        border-radius: 3px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        transform-origin: center;
    }

    .nav-toggle.active .bar {
        opacity: 0;
    }

    /* Modern close button */
    .nav-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        color: var(--text-primary);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 10002;
        font-size: 1.25rem;
        flex-shrink: 0;
    }

    .nav-close:hover,
    .nav-close:focus {
        background: rgba(255, 255, 255, 0.2);
        border-color: var(--primary-color);
        transform: rotate(90deg);
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    }

    .nav-close:active {
        color: var(--primary-color);
        transform: rotate(90deg) scale(0.95);
        background: rgba(0, 255, 255, 0.2);
    }

    /* Body scroll lock and backdrop */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }

    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(8px);
        z-index: 10000;
        animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }

    .container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 2.5rem) !important;
    }

    .hero-subtitle {
        font-size: clamp(1rem, 4vw, 1.2rem) !important;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 1rem;
    }

    .hero-buttons .btn-primary,
    .hero-buttons .btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
        min-height: 44px;
    }

    .newsletter-form {
        flex-direction: column;
        gap: 0.75rem;
    }

    .newsletter-form input {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .newsletter-form button {
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 0.8rem;
    }
    
    .nav-logo a {
        font-size: 1.2rem;
    }
    
    .logo-img {
        height: 2rem;
    }
    
    .nav-logo i {
        font-size: 1.5rem;
    }
    
    .nav-menu {
        padding: 1.5rem 0;
    }
    
    .nav-main,
    .nav-secondary,
    .nav-user {
        padding: 0 1rem;
    }
    
    .nav-link {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .nav-link.user-action {
        padding: 0.8rem 1rem;
    }
}

/* Navbar minimal/modern overrides */
.brand {
    display: inline-flex;
    align-items: center;
    margin-right: 14px;
    gap: 0.5rem;
    text-decoration: none;
}

.brand-img {
    height: 2.5rem;
    width: auto;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-item { position: relative; }

.nav-dropdown > .dropdown-toggle {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-weight: 500;
}

.nav-dropdown > .dropdown-toggle:hover {
    color: var(--primary-color);
    background: rgba(0, 255, 255, 0.1);
}

.nav-dropdown .dropdown-menu {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
}

/* Desktop dropdown motion */
.nav-dropdown .dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    pointer-events: none;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-dropdown.active .dropdown-toggle i.fa-chevron-down { transform: rotate(180deg); }


/* Enhanced Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .hover-lift:hover,
    .hover-scale:hover,
    .hover-rotate:hover,
    .hover-bounce:hover {
        transform: none !important;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInFromTop {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideInFromBottom {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px var(--primary-color);
    }
    50% {
        box-shadow: 0 0 30px var(--primary-color), 0 0 40px var(--primary-color);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes wiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(5deg);
    }
    75% {
        transform: rotate(-5deg);
    }
}

/* Animation Classes */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-bounce {
    animation: bounce 1s infinite;
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-rotate {
    animation: rotate 2s linear infinite;
}

.animate-wiggle {
    animation: wiggle 0.5s ease-in-out;
}

/* Hover Animations */
.hover-lift:hover {
    transform: translateY(-5px);
    transition: transform var(--transition-normal);
}

.hover-scale:hover {
    transform: scale(1.05);
    transition: transform var(--transition-normal);
}

.hover-glow:hover {
    box-shadow: 0 0 20px var(--primary-color);
    transition: box-shadow var(--transition-normal);
}

.hover-rotate:hover {
    transform: rotate(5deg);
    transition: transform var(--transition-normal);
}

.hover-bounce:hover {
    animation: bounce 0.6s ease-in-out;
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: rotate 1s ease-in-out infinite;
}

.loading-sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.loading-lg {
    width: 32px;
    height: 32px;
    border-width: 4px;
}

.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 25%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.1) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Glitch Effect */
.glitch {
    position: relative;
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: bold;
    text-transform: uppercase;
    animation: glitch 2s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: var(--secondary-color);
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: var(--accent-color);
    z-index: -2;
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes glitch-1 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(2px, -2px); }
    40% { transform: translate(-2px, 2px); }
    60% { transform: translate(-2px, -2px); }
    80% { transform: translate(2px, 2px); }
}

@keyframes glitch-2 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, -2px); }
    40% { transform: translate(2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(-2px, 2px); }
}

/* Leaders page tweaks */
.leader-bio {
    max-height: 6.5rem; /* limit how tall each bio can get */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
}