* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    color: #fff;
    position: relative;
}
/* --- BACKGROUND ANIMATIONS (Floating Cats) --- */
.bg-cat {
    position: absolute;
    opacity: 0.15;
    z-index: 0;
    animation: float 15s infinite ease-in-out;
    font-size: 3rem;
    user-select: none;
}
.cat-1 { top: 10%; left: 10%; animation-delay: 0s; }
.cat-2 { bottom: 20%; right: 10%; animation-delay: 2s; font-size: 4rem; }
.cat-3 { top: 40%; left: 80%; animation-delay: 4s; font-size: 2.5rem; }
.cat-4 { bottom: 10%; left: 20%; animation-delay: 6s; font-size: 3.5rem; }
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}
/* --- MAIN CARD (Glassmorphism) --- */
.card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    max-width: 500px;
    width: 90%;
    z-index: 10;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    animation: popIn 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    position: relative;
    overflow: visible !important; /* CRITICAL: Allow content to expand */
    min-height: auto;
}
@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
/* --- LOGO & TEXT --- */
.logo-container {
    margin-bottom: 1.5rem;
}
.logo-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.5);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}
.logo-img:hover {
    transform: rotate(15deg) scale(1.1);
}
h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
p.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.5;
}
/* --- BUTTONS --- */
.btn-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.0rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.btn i { margin-right: 10px; font-size: 1.4rem; }
/* Mastodon Button */
.btn-mastodon {
    background: linear-gradient(45deg, #6364ff, #563acc);
    color: white;
    box-shadow: 0 4px 15px rgba(96, 100, 255, 0.4);
}
.btn-mastodon:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(96, 100, 255, 0.6);
}
/* Pixelfed Button */
.btn-pixelfed {
    background: linear-gradient(45deg, #ff9a9e, #fad0c4);
    color: #4a4a4a;
    box-shadow: 0 4px 15px rgba(255, 154, 158, 0.4);
}
.btn-pixelfed:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 154, 158, 0.6);
}

/* --- Gaming Section Container --- */
.gaming-section {
    margin: 2rem 0;
    position: relative;
    overflow: visible !important; /* Ensure no clipping */
}

/* --- The Toggle Button --- */
.gaming-toggle {
    width: 100%;
    padding: 1.25rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(10, 10, 20, 0.95), rgba(20, 10, 30, 0.85));
    border: 2px solid #8b5cf6;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.15);
    color: #fff;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.gaming-toggle:hover {
    border-color: #a78bfa;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
}

/* Lock Icon Wrapper */
.lock-icon-wrapper {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.15);
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.4);
    z-index: 2;
    transition: all 0.4s ease;
}

.lock-icon-wrapper i {
    font-size: 1.4rem;
    color: #c4b5fd;
    transition: transform 0.4s ease, color 0.4s ease;
}

/* Glowing Ring */
.glow-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    border: 2px solid #8b5cf6;
    opacity: 0.3;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(0.9); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.6; }
    100% { transform: scale(0.9); opacity: 0.3; }
}

/* Text Wrapper */
.toggle-text-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    z-index: 2;
}

.toggle-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 5px rgba(139, 92, 246, 0.5);
}

.toggle-subtitle {
    font-size: 0.8rem;
    color: #a78bfa;
    font-weight: 400;
}

/* Arrow Icon */
.arrow-icon {
    color: #a78bfa;
    transition: transform 0.3s ease;
}

/* --- ACTIVE STATE --- */
.gaming-section.active .gaming-toggle {
    background: linear-gradient(135deg, rgba(15, 25, 40, 0.95), rgba(25, 30, 50, 0.9));
    border-color: #06b6d4;
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.4), inset 0 0 15px rgba(6, 182, 212, 0.1);
}

.gaming-section.active .lock-icon-wrapper {
    background: rgba(6, 182, 212, 0.2);
    border-color: #06b6d4;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.5);
}

.gaming-section.active .lock-icon-wrapper i {
    color: #67e8f9;
    transform: rotate(360deg);
}

.gaming-section.active .toggle-title {
    color: #67e8f9;
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.8);
}

.gaming-section.active .toggle-subtitle {
    color: #a5f3fc;
}

.gaming-section.active .arrow-icon {
    transform: rotate(180deg);
    color: #67e8f9;
}

/* --- EXPANDED CONTENT AREA (FIXED SCROLLING) --- */
.game-servers {
    /* Instead of max-height, we use height: 0 and height: auto via class */
    height: 0;
    opacity: 0;
    overflow: hidden; /* Hide content when closed */
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
    margin-top: 0;
    padding: 0 1rem;
}

/* When active, we set height to auto (requires JS helper or specific CSS trick) 
   Since CSS can't do height:auto transition smoothly, we use a large max-height fallback 
   but ensure the parent allows scrolling.
*/
.gaming-section.active .game-servers {
    height: auto; /* This forces the browser to calculate real height */
    opacity: 1;
    margin-top: 1.5rem;
    padding-bottom: 1rem;
    overflow: visible; /* Allow content to flow */
}

/* Fallback for older browsers if height:auto transition fails */
@media (prefers-reduced-motion: no-preference) {
    .game-servers {
        max-height: 0;
        overflow: hidden;
    }
    .gaming-section.active .game-servers {
        max-height: 1000px; /* Large enough for all content */
        overflow: visible;
    }
}

/* Header inside expanded area */
.servers-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #67e8f9;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: rgba(10, 20, 35, 0.8);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 8px;
    padding: 0.5rem;
}

.pulse-icon {
    animation: pulse-fast 1.5s infinite;
}

@keyframes pulse-fast {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* --- Game Server Grid --- */
.game-server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.game-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem;
    border-radius: 12px;
    background: rgba(20, 30, 45, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(6, 182, 212, 0.25);
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.game-card:hover {
    transform: translateY(-5px);
    background: rgba(30, 50, 70, 0.8);
    border-color: #06b6d4;
    box-shadow: 0 10px 25px rgba(6, 182, 212, 0.25);
}

.card-icon {
    width: 50px;
    height: 50px;
    background: rgba(6, 182, 212, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(6, 182, 212, 0.3);
    transition: all 0.3s ease;
}

.card-icon i {
    font-size: 1.4rem;
    color: #67e8f9;
}

.server-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: #e0f2fe;
}

.game-card small {
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Status Colors */
.status-online { color: #4ade80; }
.status-online i { font-size: 0.4rem; animation: blink 2s infinite; }
.status-maintenance { color: #fbbf24; }
.status-offline { color: #f87171; }

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* --- OMINOUS CLAN CARD (Diablo Style) --- */
.clan-card {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(20, 5, 10, 0.9), rgba(40, 10, 20, 0.85));
    border: 1px solid rgba(220, 38, 38, 0.5);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.15);
}

.clan-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        radial-gradient(circle at 30% 30%, rgba(220, 38, 38, 0.15), transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(120, 20, 40, 0.1), transparent 50%);
    z-index: 0;
}

.clan-card::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%; right: -50%; bottom: -50%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(220, 38, 38, 0.03) 10px,
        rgba(220, 38, 38, 0.03) 20px
    );
    z-index: 0;
    animation: scanline 8s linear infinite;
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(50px); }
}

.clan-card:hover {
    border-color: #dc2626;
    box-shadow: 0 0 35px rgba(220, 38, 38, 0.4), inset 0 0 20px rgba(220, 38, 38, 0.1);
    transform: translateY(-5px) scale(1.02);
}

.clan-icon-wrapper {
    position: relative;
    width: 70px;
    height: 70px;
    margin: 0 auto 0.75rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 38, 38, 0.15);
    border-radius: 50%;
    border: 2px solid rgba(220, 38, 38, 0.5);
    z-index: 1;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
}

.clan-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #dc2626;
    opacity: 0.4;
    animation: pulse-ring 2s infinite;
}

.clan-icon-wrapper i {
    font-size: 2rem;
    color: #dc2626;
    z-index: 2;
    filter: drop-shadow(0 0 5px rgba(220, 38, 38, 0.6));
}

.clan-tag {
    display: block;
    font-size: 0.7rem;
    color: #fca5a5;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: -0.25rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.clan-footer {
    margin-top: 0.75rem;
    padding: 0.5rem 1.25rem;
    background: rgba(220, 38, 38, 0.25);
    border: 1px solid rgba(220, 38, 38, 0.6);
    border-radius: 20px;
    color: #fecaca;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.clan-card:hover .clan-footer {
    background: #dc2626;
    color: #1a0505;
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.7);
}

@media (min-width: 600px) {
    .clan-card {
        grid-column: span 2;
    }
}

@media (max-width: 599px) {
    .clan-card {
        grid-column: 1 / -1;
    }
}

/* --- FOOTER --- */
.footer {
    margin-top: 2rem;
    font-size: 0.9rem;
    opacity: 0.7;
}
.footer a { 
    color: white;
}
/* --- RESPONSIVE --- */
@media (min-width: 600px) {
    .btn-group {
        flex-direction: row;
    }
    .btn {
        flex: 1;
    }
}