/* --- 1. GLOBAL SETTINGS --- */
body {
    background-color: #121212;
    background-image:
        radial-gradient(circle at 50% 50%, #1e1e1e 0%, #0d0d0d 100%),
        url('https://www.transparenttextures.com/patterns/dark-matter.png');
    background-blend-mode: overlay;
    font-family: 'Nunito', sans-serif;
    color: #e0e0e0;
    margin: 0;
    padding-bottom: 50px;
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #121212;
}

::-webkit-scrollbar-thumb {
    background: #ffaa00;
    border: 3px solid #121212;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #fff;
}

/* 2. FONTS SETUP */
h1,
h2,
h3,
.copy-btn,
.ip-text,
.status-label,
.dots-blue,
.dots-red,
.nav-btn,
.cmd,
.caption,
.action-btn {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
}

/* 3. HEADER (PIXEL ART STYLE) */
.header-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 40px 20px;
    margin-bottom: 40px;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 70%);
}

.header-logo img {
    height: 140px;
    image-rendering: pixelated;
    filter: drop-shadow(0 0 15px rgba(255, 170, 0, 0.2));
    animation: float 3s ease-in-out infinite;
}

.header-text-motd {
    text-align: left;
    line-height: 1.3;
    font-family: 'Minecraft', monospace !important;
}

.server-name-top {
    font-size: 26px;
    color: #ffffff;
    text-shadow: 2px 2px 0px #3f3f3f;
    margin-bottom: 6px;
    font-weight: normal;
    letter-spacing: 1px;
}

.motd-main-line {
    font-size: 34px;
    text-shadow: 3px 3px 0px #2a2a2a;
    margin-bottom: 6px;
    font-weight: normal;
}

.motd-sub-line {
    font-size: 24px;
    text-shadow: 2px 2px 0px #2a2a2a;
    letter-spacing: 1px;
    font-weight: normal;
}

.gold-text {
    color: #FFAA00;
}

.gray-text {
    color: #AAAAAA;
}

.fire-icon {
    display: inline-block;
    filter: drop-shadow(2px 2px 0px #2a2a2a);
    font-style: normal;
}

/* 4. LAYOUT & CONTAINER */
.container {
    max-width: 100%; /* Let the card control the width */
    margin: 80px auto 0;
    padding: 0 20px;
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

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

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

@keyframes pulseRed {
    0% { box-shadow: 0 0 0 0 rgba(255, 85, 85, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 85, 85, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 85, 85, 0); }
}

.tab-content {
    animation: fadeInUp 0.5s ease-out;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    border-bottom: 3px solid #ffaa00;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.nav-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

/* --- NAVIGATION LOGO --- */
.nav-logo {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 0 5px rgba(255, 170, 0, 0.5));
    transition: transform 0.3s ease;
    cursor: pointer;
}

.nav-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px rgba(255, 170, 0, 0.8));
}

@media (max-width: 768px) {
    .nav-logo { height: 40px; }
}

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

.nav-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    text-decoration: none;
    text-transform: uppercase;
    position: relative;
    transition: color 0.3s ease;
}

.nav-btn::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #ffaa00;
    transition: width 0.3s ease;
}

.nav-btn:hover::after,
.active-link::after { width: 100%; }

.nav-btn:hover,
.active-link { color: #ffaa00; }

/* --- STATUS BAR (FIXED) --- */
.status-bar {
    max-width: 700px;
    width: 95%;
    margin: 0 auto 30px;
    
    /* VITAL FOR TOOLTIP OVERLAP FIX */
    position: relative;
    z-index: 500; 

    background: linear-gradient(90deg, #222, #1a1a1a);
    border: 2px solid #333;
    border-radius: 10px;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.status-bar:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border-color: #444;
}

.status-label {
    color: #888;
    font-size: 22px;
    margin-right: 10px;
}

.ip-text {
    color: #ffaa00;
    font-size: 26px;
    letter-spacing: 1px;
}

/* --- SHINY COPY BUTTON --- */
.copy-btn {
    position: relative;
    overflow: hidden;
    background: #ffaa00;
    color: #000;
    border: none;
    padding: 5px 15px;
    font-size: 20px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.2s ease;
}

/* The White Shine Bar Animation */
.copy-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.6), transparent);
    transform: skewX(-25deg);
    animation: shine 5s infinite;
}

@keyframes shine {
    0%, 80% { left: -100%; }
    100% { left: 200%; }
}

.copy-btn:hover {
    background: #fff;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.status-dot {
    height: 10px;
    width: 10px;
    background-color: #ff5555;
    border-radius: 50%;
    display: inline-block;
    animation: pulseRed 2s infinite;
}

/* --- CARD STYLES (Glassmorphism & Layout) --- */
.card {
    /* Default Slim Card (Rules, Discord, Audio) */
    max-width: 700px;
    width: 95%;
    margin: 0 auto 30px;

    /* Glass Effect */
    background-color: rgba(26, 26, 26, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

/* --- HOME PAGE CARD (WIDE) --- */
.home-card {
    max-width: 1100px !important; /* Wide Cinematic Look */
    padding: 40px 50px;
    border-top: 4px solid #ffaa00;
}

/* --- DISCORD CARD --- */
.discord-card {
    border-top: 4px solid #5555ff;
    /* Rich background with image overlay */
    background: 
        linear-gradient(rgba(20, 20, 35, 0.9), rgba(20, 20, 35, 0.95)),
        url('https://assets-global.website-files.com/6257adef93867e56f84d3092/636e0a6a49cf127bf92de1e2_icon_clyde_blurple_RGB.png');
    background-size: cover;
    background-position: center;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

/* Pulse Animation for Discord Icon */
.discord-card div[style*="font-size: 80px"] {
    filter: drop-shadow(0 0 20px rgba(85, 85, 255, 0.6));
    animation: float 3s ease-in-out infinite;
}

.rules-card {
    border-top: 4px solid #ff5555;
    background: linear-gradient(180deg, rgba(26, 26, 26, 0.95) 0%, rgba(36, 30, 30, 0.95) 100%);
}
/* --- PREMIUM AUDIO PLAYER STYLING --- */

/* 1. Make the Card Look Like a Player */
.audio-card {
    background: linear-gradient(180deg, #1a1a1a 0%, #111111 100%);
    border: 1px solid #333;
    border-top: 4px solid #55ff55;
    /* Ensure it isn't too wide like the home card */
    max-width: 500px !important; 
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* 2. Status Text ("Live Connected") */
#audio-status {
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 30px;
    padding: 5px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    display: inline-block;
}

/* 3. The Visualizer Container */
.visualizer {
    height: 60px;
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    gap: 8px; /* Space between bars */
    align-items: flex-end;
}

/* Make bars look neon */
.bar {
    width: 12px;
    background: #55ff55;
    box-shadow: 0 0 15px #55ff55;
    border-radius: 4px 4px 0 0;
}

/* 4. "Now Playing" Text */
#now-playing-text {
    font-size: 22px;
    color: #fff;
    margin: 10px 0 30px 0;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    min-height: 60px; /* Prevents layout jumping when text changes */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 5. Volume Slider Area */
label[for="volume-slider"] {
    font-size: 12px;
    color: #888;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 10px;
}

input[type=range] {
    width: 80%; /* Don't stretch full width */
    height: 6px;
    background: #333;
    border-radius: 5px;
    margin-bottom: 30px;
    cursor: pointer;
}

/* 6. Fix the Disconnect Button */
#disconnect-btn {
    background-color: transparent;
    border: 2px solid #ff5555;
    color: #ff5555;
    box-shadow: none;
    padding: 8px 25px; /* Smaller button */
    font-size: 16px;
    border-radius: 50px; /* Pill shape */
    transition: all 0.3s ease;
    margin-top: 10px;
    width: auto; /* Don't stretch */
    display: inline-block;
}

#disconnect-btn:hover {
    background-color: #ff5555;
    color: white;
    box-shadow: 0 0 20px rgba(255, 85, 85, 0.4);
    transform: translateY(-2px);
}

/* --- HOME PAGE TEXT --- */
.about-header h2 {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 3.5rem; /* Big Title */
    line-height: 1.2;
    margin-bottom: 20px;
    text-transform: uppercase;
    background: -webkit-linear-gradient(#ffaa00, #ffcc33);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(255, 170, 0, 0.4));
}

.about-text p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: #ccc;
}

.about-text h3 {
    font-size: 28px;
    color: #ddd;
    margin-bottom: 15px;
    border-left: 4px solid #ffaa00;
    padding-left: 15px;
    text-align: left;
}

.highlight {
    color: #ffaa00;
    font-weight: bold;
}

/* --- PREMIUM AUTO SCROLLING GALLERY --- */
.scrolling-gallery-container {
    width: 100%;
    height: 320px; /* Taller for cinematic feel */
    overflow: hidden;
    
    border: 1px solid rgba(255, 170, 0, 0.2);
    border-radius: 12px;
    background: #0d0d0d;
    margin-top: 25px;
    margin-bottom: 30px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6) inset;
    position: relative;

    /* Fade Edges */
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.scrolling-gallery-track {
    display: flex;
    width: max-content;
    height: 100%; /* Fill container */
    animation: scrollGallery 40s linear infinite;
}

.scrolling-gallery-container:hover .scrolling-gallery-track {
    animation-play-state: paused;
}

.gallery-item {
    position: relative;
    width: 480px; /* Wide images */
    height: 100%; /* ESSENTIAL: Fill height to prevent gaps */
    flex-shrink: 0;
    margin-right: 2px;
    overflow: hidden;
    cursor: pointer;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* ESSENTIAL: No stretching/black bars */
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.6s;
}

.gallery-item:hover img {
    transform: scale(1.15);
    filter: brightness(1.2);
}

/* Gradient Caption */
.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 10px 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
    color: #ffaa00;
    font-family: 'Fredoka', sans-serif;
    font-size: 18px;
    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    pointer-events: none;
    transform: translateY(5px);
    transition: transform 0.3s ease;
    border-top: none;
}

.gallery-item:hover .caption {
    transform: translateY(0);
    color: #fff;
}

@keyframes scrollGallery {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- NEON FEATURE CARDS --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.feature-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(0, 0, 0, 0.4) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.icon-circle {
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    margin: 0 auto 15px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.icon-circle i {
    animation: iconFloat 3s ease-in-out infinite;
    margin: 0 !important;
}

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

.feature-card:hover .icon-circle i {
    animation: none;
    transform: scale(1.2) rotate(10deg);
}

.feature-card h4 {
    margin: 10px 0;
    font-family: 'Fredoka', sans-serif;
    font-size: 22px;
    color: #fff;
}

.feature-card p {
    font-size: 14px;
    color: #bbb;
    margin-bottom: 15px;
}

/* Color Themes */
.gold-card { border-bottom: 4px solid #ffaa00; }
.gold-card .icon-circle { color: #ffaa00; border: 2px solid rgba(255, 170, 0, 0.3); }
.gold-card:hover {
    background: linear-gradient(145deg, rgba(255, 170, 0, 0.15), rgba(0, 0, 0, 0.6));
    border-color: #ffaa00;
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 10px 30px rgba(255, 170, 0, 0.2);
}

.green-card { border-bottom: 4px solid #55ff55; }
.green-card .icon-circle { color: #55ff55; border: 2px solid rgba(85, 255, 85, 0.3); }
.green-card:hover {
    background: linear-gradient(145deg, rgba(85, 255, 85, 0.15), rgba(0, 0, 0, 0.6));
    border-color: #55ff55;
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 10px 30px rgba(85, 255, 85, 0.2);
}

.blue-card { border-bottom: 4px solid #55ffff; }
.blue-card .icon-circle { color: #55ffff; border: 2px solid rgba(85, 255, 255, 0.3); }
.blue-card:hover {
    background: linear-gradient(145deg, rgba(85, 255, 255, 0.15), rgba(0, 0, 0, 0.6));
    border-color: #55ffff;
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 10px 30px rgba(85, 255, 255, 0.2);
}

.red-card { border-bottom: 4px solid #ff5555; }
.red-card .icon-circle { color: #ff5555; border: 2px solid rgba(255, 85, 85, 0.3); }
.red-card:hover {
    background: linear-gradient(145deg, rgba(255, 85, 85, 0.15), rgba(0, 0, 0, 0.6));
    border-color: #ff5555;
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 10px 30px rgba(255, 85, 85, 0.2);
}

/* --- TAGS & COMMANDS --- */
.mini-commands, .tag-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tag, .mini-commands span {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: bold;
}

.mini-commands span { color: #ffaa00; }

.command-trigger, .rule-trigger {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 10;
}

.tag.rule-trigger:hover {
    background: rgba(85, 255, 85, 0.2);
    box-shadow: 0 0 15px rgba(85, 255, 85, 0.4);
    transform: scale(1.05);
}

.gold-card .tag.command-trigger:hover {
    background: rgba(255, 170, 0, 0.2);
    box-shadow: 0 0 15px rgba(255, 170, 0, 0.6);
    color: #ffaa00 !important;
    transform: scale(1.1);
    border: 1px solid rgba(255, 170, 0, 0.5);
}

.green-card .tag.command-trigger:hover {
    background: rgba(85, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(85, 255, 255, 0.4);
    color: #55ffff !important;
    transform: scale(1.05);
}

.red-card .tag.command-trigger:hover {
    background: rgba(255, 85, 85, 0.2);
    box-shadow: 0 0 15px rgba(255, 85, 85, 0.4);
    color: #ff5555 !important;
    transform: scale(1.05);
}

/* --- RULES GRID --- */
.rules-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    list-style: none;
    padding-left: 0;
    text-align: left;
}

.rules-list li {
    background: rgba(0, 0, 0, 0.4);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #ff5555;
    transition: transform 0.2s ease, background 0.2s;
    display: flex;
    align-items: center;
}

.rules-list li:hover {
    transform: translateY(-3px);
    background: rgba(255, 85, 85, 0.1);
    cursor: pointer;
}

@media (max-width: 768px) {
    .rules-list { grid-template-columns: 1fr; }
    .header-box { flex-direction: column; text-align: center; gap: 20px; }
    .header-text-motd { text-align: center; }
    .status-bar { flex-direction: column; gap: 15px; text-align: center; }
}

/* --- BUTTONS --- */
.action-btn {
    padding: 12px 30px;
    border: none;
    font-size: 24px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.1s;
    position: relative;
    top: 0;
    border-bottom: 5px solid rgba(0, 0, 0, 0.4);
    border-radius: 6px;
}

.action-btn:active {
    top: 4px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.4);
    box-shadow: none !important;
}

.blue-btn {
    background-color: #5555ff;
    color: white;
    box-shadow: 0 0 10px #5555ff;
}

/* --- STAFF LIST STYLING --- */
.staff-list {
    width: 100% !important;
    max-width: 320px !important;
    margin: 0 auto !important;
    display: flex;
    flex-direction: column;
    align-items: stretch !important;
    background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255, 255, 255, 0.02) 10px, rgba(255, 255, 255, 0.02) 20px);
    padding: 15px;
    border-radius: 8px;
    position: relative;
}

.staff-row {
    width: 100% !important;
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    padding: 12px 20px !important;
    box-sizing: border-box;
    margin-bottom: 8px;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 8px;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.staff-row:nth-child(1) { animation-delay: 0.1s; }
.staff-row:nth-child(2) { animation-delay: 0.2s; }
.staff-row:nth-child(3) { animation-delay: 0.3s; }
.staff-row:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.05);
}

.staff-row[href]::after {
    content: "→";
    position: absolute;
    right: 15px;
    color: #ffaa00;
    font-size: 20px;
    opacity: 0;
    transition: all 0.3s ease;
}

.staff-row[href]:hover::after { opacity: 1; right: 10px; }

.staff-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    margin-right: 12px;
    transition: transform 0.3s ease;
}

.staff-row:hover .staff-avatar { transform: scale(1.1) rotate(5deg); }

.staff-info { display: flex; flex-direction: column; gap: 4px; }
.staff-name { font-size: 18px; color: #fff; font-weight: 700; }
.staff-row:hover .staff-name { color: #ffaa00; }

.staff-role {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    background-size: 300% 300%;
    animation: roleGradient 6s ease infinite;
}

@keyframes roleGradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

.role-owner { background-image: linear-gradient(270deg, #ffd700, #ffb300, #fff4b0, #ffd700); color: #000; }
.role-owner::after { content: " 👑"; }
.border-owner { border: 3px solid gold; box-shadow: 0 0 15px gold; }

.role-web { background-image: linear-gradient(270deg, #00d4ff, #3a7bd5, #00f2fe, #00d4ff); color: #000; }
.border-web { border: 2px solid #55bbff; box-shadow: 0 0 10px rgba(85, 187, 255, 0.4); }

.role-plugin { background-image: linear-gradient(270deg, #b16cff, #7f00ff, #d3a4ff, #b16cff); color: #000; }
.border-plugin { border: 2px solid #5b32ee; box-shadow: 0 0 10px rgba(91, 50, 238, 0.4); }

/* --- MODALS & EXTRAS --- */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    align-items: center; justify-content: center;
    animation: fadeIn 0.3s;
}

.modal-box {
    background: linear-gradient(180deg, #1a1a1a 0%, #241e1e 100%);
    padding: 30px;
    border-radius: 12px;
    width: 90%; max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 0 30px rgba(255, 85, 85, 0.3);
    border: 2px solid #ff5555;
}

.modal-title {
    font-size: 32px; color: #ff5555;
    text-align: center; margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 85, 85, 0.2);
}

.modal-body { display: flex; gap: 25px; align-items: flex-start; }
.modal-body.no-image .modal-img-container { display: none; }
.modal-body.no-image .modal-text-container { flex: 100%; text-align: center; }
#modal-rule-image { width: 100%; border-radius: 8px; border: 2px solid #333; }
.close-modal-btn { position: absolute; top: 15px; right: 20px; font-size: 35px; cursor: pointer; color: #aaa; }
.close-modal-btn:hover { color: #ff5555; }

/* Tooltip for Player List */
#player-list-tooltip {
    visibility: hidden; opacity: 0;
    position: absolute; top: 140%; right: 0;
    background-color: rgba(18, 18, 18, 0.98);
    border: 2px solid #ffaa00;
    border-radius: 8px;
    padding: 15px;
    min-width: 200px; max-height: 300px;
    overflow-y: auto; z-index: 2000;
    transition: all 0.3s ease-in-out;
}
.player-count:hover #player-list-tooltip { visibility: visible; opacity: 1; top: 120%; }
.player-row { display: flex; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.player-head { width: 24px; height: 24px; margin-right: 12px; border-radius: 4px; }

/* Visualizer Bars */
.visualizer { display: flex; justify-content: center; gap: 5px; height: 50px; align-items: flex-end; margin-bottom: 20px; }
.bar { width: 10px; background-color: #ffaa00; animation: bounce 1s infinite ease-in-out; }
.bar:nth-child(1) { height: 20px; } .bar:nth-child(2) { height: 35px; animation-delay: 0.2s; }
.bar:nth-child(3) { height: 50px; animation-delay: 0.4s; } .bar:nth-child(4) { height: 30px; animation-delay: 0.1s; }
.bar:nth-child(5) { height: 40px; animation-delay: 0.3s; }
@keyframes bounce { 0%, 100% { transform: scaleY(1); opacity: 0.5; } 50% { transform: scaleY(1.5); opacity: 1; } }

/* Lightbox */
.lightbox { display: none; position: fixed; z-index: 2000; width: 100%; height: 100%; background: rgba(0,0,0,0.95); backdrop-filter: blur(5px); }
.lightbox-content { max-width: 90%; max-height: 90vh; border: 2px solid #ffaa00; box-shadow: 0 0 25px rgba(255,170,0,0.5); }
.close-btn { position: absolute; top: 15px; right: 35px; color: #fff; font-size: 40px; cursor: pointer; }

/* Misc */
.footer { text-align: center; margin-top: 50px; color: #555; border-top: 1px solid #222; padding-top: 20px; }
.footer-logo { display: block; margin: 0 auto 20px auto; max-width: 400px; width: 90%; filter: drop-shadow(0 0 15px rgba(255, 170, 0, 0.3)); transition: transform 0.3s; }
.footer-logo:hover { transform: scale(1.05); filter: drop-shadow(0 0 25px rgba(255, 170, 0, 0.6)); }
.title-blue { color: #5555ff; font-size: 50px; text-shadow: 0 0 15px rgba(85, 85, 255, 0.4); }
.title-red { color: #ff5555; font-size: 50px; text-shadow: 0 0 15px rgba(255, 85, 85, 0.4); }
.title-green { color: #55ff55; font-size: 50px; text-shadow: 0 0 20px rgba(85, 255, 85, 0.6); }
.dots-blue { color: #5555ff; letter-spacing: 5px; margin-top: 20px; font-size: 24px; }
.dots-red { color: #ff5555; letter-spacing: 5px; margin-top: 20px; font-size: 24px; }
hr { border: 0; border-top: 1px solid #333; margin: 30px 0; }
.center-content { text-align: center; }

/* Particles */
.particles { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.particles span { position: absolute; bottom: -50px; width: 10px; height: 10px; background: rgba(255, 170, 0, 0.5); box-shadow: 0 0 10px #ffaa00; animation: rise 15s infinite linear; }
.particles span:nth-child(1) { left: 10%; animation-duration: 10s; }
.particles span:nth-child(2) { left: 20%; width: 15px; height: 15px; animation-duration: 12s; }
.particles span:nth-child(3) { left: 50%; animation-duration: 14s; }
@keyframes rise { 0% { transform: translateY(0) rotate(0deg); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; } }
/* --- CLICK FIXES --- */

/* 1. Force the image to accept mouse events */
.gallery-item, .gallery-item img {
    pointer-events: auto !important;
    z-index: 10; /* Ensure it sits above background layers */
}

/* 2. Ensure captions don't block the click */
.caption {
    pointer-events: none; /* Click passes through text to the image */
}

/* 3. Remove any old overlay blockers from the container */
.scrolling-gallery-container::before,
.scrolling-gallery-container::after {
    display: none !important;
    pointer-events: none;
}

/* --- SPOTIFY STYLE WIDGET --- */
.spotify-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Fredoka', sans-serif;
}

/* 1. Connect Button */
#connect-wrapper {
    background: #1DB954; /* Spotify Green */
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(29, 185, 84, 0.4);
    transition: transform 0.2s ease;
}

#connect-wrapper:hover {
    transform: scale(1.05);
    background: #1ed760; /* Lighter Green */
}

/* 2. The Player Bar */
#player-controls {
    background: #181818; /* Spotify Dark Grey */
    border: 1px solid #282828;
    border-radius: 8px; /* Rounded Rectangle, not Pill */
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 320px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Album Art (Square) */
.album-art {
    width: 45px;
    height: 45px;
    background: #282828;
    border-radius: 4px; /* Slight radius */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.album-art i {
    color: #b3b3b3;
    font-size: 20px;
}

/* Song Text */
.song-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-right: auto; /* Pushes controls to right */
    max-width: 120px;
}

#now-playing-title {
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#now-playing-artist {
    color: #b3b3b3;
    font-size: 11px;
}

/* Play/Pause Button */
.control-btn {
    background: #fff;
    color: #000;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: transform 0.2s;
}

.control-btn:hover {
    transform: scale(1.1);
}

/* --- FIXED VOLUME & BUTTON POLISH (FINAL) --- */

/* 1. Volume Group Container */
.volume-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 32px;
}

/* 2. The Volume Slider */
#volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 70px;
    height: 4px; 
    background: #404040;
    border-radius: 2px;
    outline: none;
    margin: 0;
    cursor: pointer;
    
    /* FIX: Lift the entire slider up 1 pixel */
    position: relative;
    top: -1px; 
}

/* Slider Knob (Thumb) */
#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    
    /* FIX: Pull the dot UP to center it on the line */
    /* If it looks low, make this number larger negative (e.g. -5px) */
    margin-top: -4px; 
    
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

/* 3. The Close (X) Button - FORCED CIRCLE */
.close-btn-spot {
    background: transparent;
    border: 1px solid #ff5555;
    color: #ff5555;
    cursor: pointer;
    
    /* FORCE SQUARE DIMENSIONS */
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important; /* Prevents squishing */
    max-width: 32px !important; /* Prevents stretching */
    
    border-radius: 50%;
    padding: 0 !important; /* Remove internal padding */
    margin: 0 0 0 10px; /* Only left margin */
    
    /* Perfect Center Content */
    display: flex;
    align-items: center;
    justify-content: center;
    
    transition: all 0.2s ease;
}

.close-btn-spot i {
    font-size: 14px;
    /* Remove any weird icon margins */
    margin: 0; 
    padding: 0;
    line-height: 0; 
}

.close-btn-spot:hover {
    background: #ff5555;
    color: #fff;
    transform: scale(1.1);
}
