/* Modern Minimalistic Design with Matrix Rain Effect */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-bg: #feead2;
    --secondary-bg: #f5e6d3;
    --accent-color: #d4a574;
    --text-primary: #5d4e37;
    --text-secondary: #8b7355;
    --text-muted: #a0916e;
    --white: #ffffff;
    --shadow-light: rgba(93, 78, 55, 0.08);
    --shadow-medium: rgba(93, 78, 55, 0.12);
    --shadow-heavy: rgba(93, 78, 55, 0.16);
    --border-light: rgba(93, 78, 55, 0.12);
    --gradient-primary: linear-gradient(135deg, #feead2 0%, #f5e6d3 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #fef8f0 100%);
    --gradient-accent: linear-gradient(135deg, #d4a574 0%, #c49660 100%);
    
    /* Font families */
    --font-mono: 'JetBrains Mono', monospace;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Common transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Text gradient for headings */
    --gradient-text: linear-gradient(135deg, #4a3a2a 0%, #8b6f47 25%, #c49660 50%, #8b6f47 75%, #4a3a2a 100%);
    
    /* Performance optimizations */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 20px;
    --z-index-matrix: 1000;
    --z-index-content: 2;
    
    /* Matrix colors for better contrast */
    --matrix-text-color: rgba(212, 165, 116, 0.55);
    --matrix-shadow-color: rgba(212, 165, 116, 0.3);
}

/* Dark theme support */
[data-theme="dark"] {
    --primary-bg: #2d2520;
    --secondary-bg: #3a3025;
    --accent-color: #d4a574;
    --text-primary: #f5e6d3;
    --text-secondary: #d4c3a6;
    --text-muted: #b8a589;
    --white: #1a1614;
    --shadow-light: rgba(245, 230, 211, 0.08);
    --shadow-medium: rgba(245, 230, 211, 0.12);
    --shadow-heavy: rgba(245, 230, 211, 0.16);
    --border-light: rgba(245, 230, 211, 0.12);
    --gradient-primary: linear-gradient(135deg, #2d2520 0%, #3a3025 100%);
    --gradient-card: linear-gradient(145deg, #1a1614 0%, #2d2520 100%);
    --gradient-text: linear-gradient(135deg, #f5e6d3 0%, #d4c3a6 25%, #d4a574 50%, #d4c3a6 75%, #f5e6d3 100%);
    --matrix-text-color: rgba(212, 165, 116, 0.7);
    --matrix-shadow-color: rgba(212, 165, 116, 0.4);
}

body {
    font-family: var(--font-body);
    background: linear-gradient(to bottom, #feead2 0%, #fff5e8 100%);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 15px;
    height: 100vh;
    overflow-y: auto;
    position: relative;
    opacity: 0;
    animation: pageLoad 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    
    /* Modern 2025 features */
    color-scheme: light; /* Force light mode by default */
    container-type: inline-size; /* Container queries support */
    
    /* Performance optimizations */
    transform: translateZ(0);
    will-change: opacity;
    backface-visibility: hidden;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .gradient-text {
        animation: none !important;
        background: var(--text-primary) !important;
        background-clip: initial !important;
        -webkit-background-clip: initial !important;
        -webkit-text-fill-color: var(--text-primary) !important;
    }
}

/* Matrix Rain Animation - Enhanced for performance */
.matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    /* Performance optimizations */
    transform: translateZ(0);
    will-change: contents;
    backface-visibility: hidden;
}

/* Matrix text performance optimizations */
.matrix-text {
    /* Hardware acceleration */
    transform: translateZ(0);
    will-change: transform, opacity;
    backface-visibility: hidden;
    /* Prevent text selection issues */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}


/* Utility Classes */
.gradient-text {
    background: var(--gradient-text);
    background-size: 300% 300%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 6s ease-in-out infinite;
}

.performance-optimized {
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: var(--z-index-content);
}

/* Header Layout */
.header {
    padding: 16px 0 20px 0;
}

.header-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.logo-section {
    flex-shrink: 0;
}

.logo {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    filter: drop-shadow(0 8px 24px var(--shadow-medium));
    transition: var(--transition-smooth);
    cursor: pointer;
    position: relative;
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}

.logo::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent-color), #e8b888, var(--accent-color));
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.logo:hover {
    transform: translateY(-6px) scale(1.05) rotate(2deg);
    filter: drop-shadow(0 16px 40px var(--shadow-heavy)) brightness(1.1);
}

.logo:hover::before {
    opacity: 0.3;
}

.main-header {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    min-height: 120px;
}

.brand-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 8px;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-shadow: 0 3px 6px rgba(93, 78, 55, 0.3), 0 1px 2px rgba(93, 78, 55, 0.2);
    margin: 0;
    padding: 0;
    transform-origin: left center;
    position: relative;
    display: block;
    text-align: left;
    will-change: background-position;
}

/* Fallback color for browsers that don't support gradient text */
.brand-name:not(.gradient-text) {
    color: var(--text-primary);
}

/* Enhanced gradient animation for brand name */
.brand-name.gradient-text {
    /* Force hardware acceleration */
    transform: translateZ(0);
    will-change: background-position;
    backface-visibility: hidden;
}

.brand-tagline {
    font-size: 20px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2.8px;
    text-shadow: 0 2px 4px rgba(93, 78, 55, 0.25), 0 1px 2px rgba(93, 78, 55, 0.15);
    text-align: left;
    display: block;
    margin: 0;
    padding: 0;
}

.discord-section {
    padding-top: 8px;
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Theme Toggle Button - Matching Discord Button Style */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px; /* Match Discord button padding exactly */
    background: var(--gradient-accent);
    color: var(--white);
    border: none;
    border-radius: 14px;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.2; /* Match Discord button line-height */
    cursor: pointer;
    box-shadow: 0 6px 16px var(--shadow-light);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 47px; /* Force exact height match */
    box-sizing: border-box;
}

.theme-toggle::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 0.6s ease;
}

.theme-toggle:hover::before {
    left: 100%;
}

.theme-toggle:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px var(--shadow-medium);
    background: linear-gradient(135deg, #e8b888 0%, #d4a574 100%);
}

.theme-toggle:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
    transform: translateY(-2px) scale(1.02);
}

.theme-icon {
    transition: transform 0.3s ease;
    width: 18px;
    height: 18px;
}

.theme-toggle:hover .theme-icon {
    transform: scale(1.1) rotate(-5deg);
}

/* Dark theme styling for theme toggle - enhanced visibility */
body[data-theme="dark"] .theme-toggle {
    background: linear-gradient(135deg, #e8b888 0%, #d4a574 100%);
    color: #2a241f;
    box-shadow: 0 6px 16px rgba(232, 184, 136, 0.3);
}

body[data-theme="dark"] .theme-toggle:hover {
    background: linear-gradient(135deg, #f0c49a 0%, #e8b888 100%);
    box-shadow: 0 12px 32px rgba(232, 184, 136, 0.4);
}

body[data-theme="dark"] .theme-toggle::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

/* Discord Button */
.discord-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: var(--gradient-accent);
    color: var(--white);
    text-decoration: none;
    border-radius: 14px;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.2; /* Ensure consistent line-height */
    box-shadow: 0 6px 16px var(--shadow-light);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 47px; /* Force exact height match */
    box-sizing: border-box;
}

.discord-button::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 0.6s ease;
}

.discord-button:hover::before {
    left: 100%;
}

.discord-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px var(--shadow-medium);
    background: linear-gradient(135deg, #e8b888 0%, #d4a574 100%);
}

.discord-button svg {
    transition: transform 0.3s ease;
}

.discord-button:hover svg {
    transform: scale(1.1) rotate(-5deg);
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 16px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    animation: heroTitleEntrance 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards;
    text-shadow: 0 3px 6px rgba(93, 78, 55, 0.25), 0 1px 3px rgba(93, 78, 55, 0.18);
    transform-origin: center;
    will-change: transform, opacity, background-position;
}

/* Gradient animation for hero title - optimized for performance */
.hero-title.gradient-text {
    animation: heroTitleEntrance 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards,
               gradientShift 6s ease-in-out 1.8s infinite;
    /* Force hardware acceleration */
    transform: translateZ(0);
    will-change: background-position, transform, opacity;
    backface-visibility: hidden;
}

/* Fallback color for browsers that don't support gradient text */
.hero-title:not(.gradient-text) {
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 400;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
    text-shadow: 0 2px 4px rgba(93, 78, 55, 0.18), 0 1px 2px rgba(93, 78, 55, 0.12);
    line-height: 1.4;
}

.subtitle-highlight {
    font-weight: 700;
    color: var(--accent-color);
    background: linear-gradient(135deg, 
        #c49660 0%, 
        #d4a574 50%, 
        #c49660 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 3px 6px rgba(196, 150, 96, 0.4), 0 1px 3px rgba(196, 150, 96, 0.3);
    position: relative;
}

.subtitle-highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0.6;
}

.subtitle-divider {
    margin: 0 8px;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 18px;
    text-shadow: 0 0 8px rgba(212, 165, 116, 0.5);
    animation: pulse 3s ease-in-out infinite;
}

.subtitle-years {
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
    padding: 2px 8px;
    background: rgba(212, 165, 116, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(212, 165, 116, 0.2);
    text-shadow: 0 1px 2px rgba(93, 78, 55, 0.15);
}

/* Timeline Indicator */
.timeline-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 16px 0;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.timeline-line {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color) 0%, #e8b888 50%, var(--accent-color) 100%);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    transform: scaleX(0);
    transform-origin: left;
    animation: lineGrow 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.8s forwards;
}

.timeline-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: shimmer 3s infinite 2s;
}

.timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gradient-accent);
    position: relative;
    box-shadow: 0 2px 8px rgba(212, 165, 116, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
}

.timeline-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(212, 165, 116, 0.3);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
}

.timeline-dot:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 16px rgba(212, 165, 116, 0.6);
}

.timeline-dot:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

.timeline-start {
    margin-right: -5px;
    z-index: 1;
    animation: dotAppear 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.6s both;
}

.timeline-end {
    margin-left: -5px;
    z-index: 1;
    animation: dotAppear 0.6s cubic-bezier(0.4, 0, 0.2, 1) 2.2s both;
}

@keyframes lineGrow {
    to {
        transform: scaleX(1);
    }
}

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

/* Main Content */
.main-content {
    flex: 1;
    padding-bottom: 16px;
}

/* Community Message */
.community-message {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(254, 234, 210, 0.6) 100%);
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    backdrop-filter: blur(12px);
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    animation: communityMessageEntrance 1.0s cubic-bezier(0.4, 0, 0.2, 1) 2.0s forwards;
    position: relative;
    overflow: hidden;
}

.community-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent-color), #e8b888, var(--accent-color));
    z-index: -1;
    border-radius: 20px;
    padding: 2px;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.community-message::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: subtleShimmer 8s ease-in-out infinite;
    pointer-events: none;
}

.thank-you-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
    font-weight: 500;
    font-style: italic;
    text-shadow: 0 3px 6px rgba(93, 78, 55, 0.2), 0 1px 3px rgba(93, 78, 55, 0.15);
    position: relative;
    z-index: 1;
}

@keyframes subtleShimmer {
    0%, 100% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 0;
    }
    50% {
        transform: translateX(0%) translateY(0%) rotate(45deg);
        opacity: 1;
    }
}

/* Servers Section */
.servers-section {
    margin-bottom: 20px;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-align: center;
    letter-spacing: -0.01em;
    text-shadow: 0 3px 6px rgba(93, 78, 55, 0.2), 0 1px 3px rgba(93, 78, 55, 0.15);
}

/* Minimalistic Server List */
.servers-list {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.server-header,
.server-item {
    display: grid;
    grid-template-columns: 2fr 1.4fr 1.2fr 1.6fr;
    gap: 24px;
    padding: 12px 20px;
    align-items: center;
}

.server-header {
    background: rgba(212, 165, 116, 0.1);
    border-bottom: 2px solid rgba(212, 165, 116, 0.2);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.server-item {
    border-bottom: 1px solid rgba(93, 78, 55, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}

.server-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-color), #e8b888);
    transform: scaleY(0);
    transition: transform 0.3s ease;
    border-radius: 0 2px 2px 0;
}

.server-item:last-child {
    border-bottom: none;
}

.server-item:hover {
    background: linear-gradient(90deg, rgba(212, 165, 116, 0.12) 0%, rgba(212, 165, 116, 0.04) 100%);
    transform: translateX(8px);
    box-shadow: 0 4px 16px rgba(212, 165, 116, 0.15);
    border-radius: 0 8px 8px 0;
}

.server-item:hover::before {
    transform: scaleY(1);
}

.server-item:hover .server-name {
    color: var(--accent-color);
    font-weight: 700;
}

.server-item:hover .server-status {
    transform: scale(1.05);
}


.server-name {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    text-shadow: 0 2px 4px rgba(93, 78, 55, 0.15), 0 1px 2px rgba(93, 78, 55, 0.1);
}

.server-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: pre;
    text-align: center;
}

.header-name {
    font-family: 'Outfit', sans-serif;
}

.header-date {
    font-family: 'Outfit', sans-serif;
    text-align: center;
}

.header-rates {
    font-family: 'Outfit', sans-serif;
    text-align: center;
}

.header-status {
    font-family: 'Outfit', sans-serif;
    text-align: center;
}

.server-rates {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: pre;
    text-align: center;
}

.server-status {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1.2;
    margin: 0 auto;
    display: inline-block;
}

.status-closed {
    background: rgba(139, 115, 85, 0.15);
    color: var(--text-secondary);
    border: 1px solid rgba(139, 115, 85, 0.25);
}

/* Footer */
.footer {
    padding: 24px 0;
    border-top: 2px solid transparent;
    background: linear-gradient(var(--primary-bg), var(--primary-bg)) padding-box,
                linear-gradient(90deg, transparent, var(--accent-color), transparent) border-box;
    margin-top: 32px;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), #e8b888, var(--accent-color));
    border-radius: 1px;
}

.footer-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-text {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
    text-shadow: 0 2px 4px rgba(93, 78, 55, 0.12), 0 1px 2px rgba(93, 78, 55, 0.08);
    transition: color 0.3s ease;
}

.footer-text:first-child {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-text:hover {
    color: var(--accent-color);
}

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

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes matrixFall {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

@keyframes matrixGlow {
    0%, 100% {
        text-shadow: 0 0 3px currentColor;
    }
    50% {
        text-shadow: 0 0 8px currentColor, 0 0 12px currentColor;
    }
}

@keyframes heroTitleEntrance {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    60% {
        opacity: 0.8;
        transform: translateY(-5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes communityMessageEntrance {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    50% {
        opacity: 0.6;
        transform: translateY(-3px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
    .hero-title,
    .community-message {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Matrix Rain Characters - Optimized for performance */
.matrix-char {
    position: absolute;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    pointer-events: none;
    white-space: nowrap;
    animation: matrixGlow 3s ease-in-out infinite;
    text-shadow: 0 0 3px currentColor;
    contain: layout style paint; /* CSS Containment for performance */
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

/* Staggered Animation for Server Items */
.server-item {
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.server-item:nth-child(1) { animation-delay: 0.05s; }
.server-item:nth-child(2) { animation-delay: 0.1s; }
.server-item:nth-child(3) { animation-delay: 0.15s; }
.server-item:nth-child(4) { animation-delay: 0.2s; }
.server-item:nth-child(5) { animation-delay: 0.25s; }
.server-item:nth-child(6) { animation-delay: 0.3s; }
.server-item:nth-child(7) { animation-delay: 0.35s; }
.server-item:nth-child(8) { animation-delay: 0.4s; }
.server-item:nth-child(9) { animation-delay: 0.45s; }
.server-item:nth-child(10) { animation-delay: 0.5s; }
.server-item:nth-child(11) { animation-delay: 0.55s; }
.server-item:nth-child(12) { animation-delay: 0.6s; }
.server-item:nth-child(13) { animation-delay: 0.65s; }

/* Responsive Design */
@media (max-width: 1024px) {
    body {
        overflow-y: auto;
        height: auto;
    }
    
    .container {
        height: auto;
        overflow-y: visible;
    }
    
    .header-layout {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 24px;
    }
    
    .main-header {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        min-height: auto;
    }
    
    .logo {
        width: 100px;
        height: 100px;
    }
    
    .brand-name {
        font-size: 32px;
    }
    
    .server-header {
        display: none;
    }
    
    .server-item {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 16px 20px;
        text-align: center;
    }
    
    .server-name {
        font-size: 18px;
        margin-bottom: 4px;
    }
    
    .server-date,
    .server-rates {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .logo {
        width: 80px;
        height: 80px;
    }
    
    .brand-name {
        font-size: 28px;
    }
    
    .brand-tagline {
        font-size: 14px;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
    
    .discord-button {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .community-message {
        padding: 20px;
    }
    
    .thank-you-text {
        font-size: 15px;
    }
    
    .server-item {
        padding: 14px 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .logo {
        width: 64px;
        height: 64px;
    }
    
    .brand-name {
        font-size: 24px;
    }
    
    .discord-button {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .community-message {
        padding: 16px;
    }
    
    .thank-you-text {
        font-size: 14px;
    }
    
    .server-item {
        padding: 12px;
    }
    
    .server-name {
        font-size: 16px;
    }
}

/* Page transition animation */
@keyframes pageLoad {
    to {
        opacity: 1;
    }
}

/* Modern scrollbar - Hardware accelerated */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--secondary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 3px;
    transform: translateZ(0); /* Force hardware acceleration */
}

::-webkit-scrollbar-thumb:hover {
    background: #c49660;
    transform: translateZ(0);
}

/* Enhanced Accessibility and Performance */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .matrix-char {
        display: none !important; /* Hide matrix rain for reduced motion */
    }
    
    .brand-name {
        animation: none !important;
        background: var(--text-primary);
        background-clip: text;
        -webkit-background-clip: text;
        color: var(--text-primary);
    }
}


/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--accent-color);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    z-index: 1000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}


/* Enhanced focus styles for better accessibility */
.server-item:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
    background: linear-gradient(90deg, rgba(212, 165, 116, 0.15) 0%, rgba(212, 165, 116, 0.05) 100%);
    transform: translateX(8px);
    z-index: 10;
    position: relative;
    box-shadow: 0 4px 16px rgba(212, 165, 116, 0.2);
    border-radius: 0 8px 8px 0;
}

.discord-button:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
    transform: translateY(-2px) scale(1.02);
}

.logo:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 4px;
    transform: translateY(-4px) scale(1.03);
}

/* Loading animations */
.page-loading {
    opacity: 0;
    animation: pageLoadIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes pageLoadIn {
    to {
        opacity: 1;
    }
}


/* High contrast mode support */
@media (forced-colors: active) {
    :root {
        --text-primary: CanvasText;
        --text-secondary: CanvasText;
        --accent-color: Highlight;
        --border-light: CanvasText;
    }
    
    .matrix-char {
        display: none; /* Hide decorative elements in forced colors mode */
    }
}

/* Performance optimizations */
.server-item {
    contain: layout style;
}

.matrix-rain {
    contain: layout style paint;
    isolation: isolate;
}

/* Modern 2025 Micro-Interactions */
@property --rotation {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.modern-hover {
    --rotation: 0deg;
    transition: --rotation 0.3s ease-in-out;
}

.modern-hover:hover {
    --rotation: 2deg;
    transform: rotate(var(--rotation));
}

/* Sustainable Design - Reduce Motion by Default */
@media (prefers-reduced-motion: no-preference) {
    .subtle-animation {
        animation: subtleFloat 4s ease-in-out infinite;
    }
}

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

/* Modern Container Queries for 2025 */
@container (min-width: 400px) {
    .brand-name {
        font-size: clamp(32px, 8vw, 56px);
    }
}

/* Dark Mode Support with proper readability */
body[data-theme="dark"] {
    --primary-bg: #2a241f;
    --secondary-bg: #3a342f;
    --accent-color: #e8b888;
    --text-primary: #f5e6d3;
    --text-secondary: #d4c3b0;
    --text-muted: #b5a48f;
    --white: #1a1512;
    --shadow-light: rgba(0, 0, 0, 0.2);
    --shadow-medium: rgba(0, 0, 0, 0.3);
    --shadow-heavy: rgba(0, 0, 0, 0.4);
    --border-light: rgba(245, 230, 211, 0.2);
    background: linear-gradient(to bottom, #2a241f 0%, #1a1512 100%);
}

/* Dark theme specific styling for table and community message */
body[data-theme="dark"] .servers-list {
    background: rgba(42, 36, 31, 0.9);
    border: 1px solid rgba(245, 230, 211, 0.15);
    backdrop-filter: blur(10px);
}

body[data-theme="dark"] .server-header {
    background: rgba(232, 184, 136, 0.15);
    border-bottom: 2px solid rgba(232, 184, 136, 0.25);
    color: var(--text-primary);
}

body[data-theme="dark"] .server-item {
    border-bottom: 1px solid rgba(245, 230, 211, 0.1);
}

body[data-theme="dark"] .server-item:hover {
    background: linear-gradient(90deg, rgba(232, 184, 136, 0.15) 0%, rgba(232, 184, 136, 0.05) 100%);
    box-shadow: 0 4px 16px rgba(232, 184, 136, 0.2);
}

body[data-theme="dark"] .server-name {
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
}

body[data-theme="dark"] .server-date,
body[data-theme="dark"] .server-rates {
    color: var(--text-secondary);
}

body[data-theme="dark"] .status-closed {
    background: rgba(180, 155, 125, 0.2);
    color: var(--text-secondary);
    border: 1px solid rgba(180, 155, 125, 0.3);
}

/* Community message dark theme styling */
body[data-theme="dark"] .community-message {
    background: linear-gradient(135deg, rgba(42, 36, 31, 0.9) 0%, rgba(58, 52, 47, 0.8) 100%);
    border: 2px solid transparent;
    background-clip: padding-box;
    backdrop-filter: blur(12px);
}

body[data-theme="dark"] .community-message::before {
    background: linear-gradient(135deg, var(--accent-color), #d4a574, var(--accent-color));
}

body[data-theme="dark"] .community-message::after {
    background: linear-gradient(45deg, transparent, rgba(0, 0, 0, 0.03), transparent);
    /* Subtle animation effect for dark theme - maintains animation but minimal visible shimmer */
}

body[data-theme="dark"] .thank-you-text {
    color: #f5e6d3;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Section title dark theme */
body[data-theme="dark"] .section-title {
    color: var(--text-primary);
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Footer dark theme */
body[data-theme="dark"] .footer {
    border-top: 2px solid transparent;
    background: linear-gradient(var(--primary-bg), var(--primary-bg)) padding-box,
                linear-gradient(90deg, transparent, var(--accent-color), transparent) border-box;
}

body[data-theme="dark"] .footer-text {
    color: var(--text-muted);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
}

body[data-theme="dark"] .footer-text:first-child {
    color: var(--text-secondary);
}

body[data-theme="dark"] .footer-text:hover {
    color: var(--accent-color);
}

/* Modern Focus Management */
:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* 2025 Typography with Variable Fonts Support */
@supports (font-variation-settings: normal) {
    .brand-name {
        font-variation-settings: 'wght' 700, 'wdth' 100;
        transition: font-variation-settings 0.3s ease;
    }
    
    .brand-name:hover {
        font-variation-settings: 'wght' 800, 'wdth' 105;
    }
}