/* ===== CSS Variables & Reset ===== */
:root {
    --primary-teal: #00d9ff;
    --primary-blue: #0066ff;
    --accent-purple: #a855f7;
    --accent-emerald: #10b981;
    --glow-teal: rgba(0, 217, 255, 0.5);
    --glow-purple: rgba(168, 85, 247, 0.4);
    --bg-dark: #0a0e17;
    --bg-card: rgba(15, 23, 42, 0.8);
    --bg-card-hover: rgba(30, 41, 59, 0.9);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-subtle: rgba(148, 163, 184, 0.1);
    --border-glow: rgba(0, 217, 255, 0.3);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

/* ===== Background Effects ===== */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(0, 150, 200, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 30%, rgba(0, 100, 150, 0.15) 0%, transparent 40%),
        linear-gradient(180deg, #0a1628 0%, #0d2847 40%, #0f3460 70%, #1a4a6e 100%);
    z-index: -5;
}

/* Ocean floor gradient */
.ocean-floor {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(0deg,
            rgba(20, 60, 80, 0.9) 0%,
            rgba(15, 50, 70, 0.6) 30%,
            transparent 100%);
    z-index: -2;
    pointer-events: none;
}

/* ===== Underwater Light Rays ===== */
.light-rays {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -4;
    overflow: hidden;
    pointer-events: none;
}

.light-ray {
    position: absolute;
    top: -20%;
    width: 150px;
    height: 140%;
    background: linear-gradient(180deg,
            rgba(100, 200, 255, 0.08) 0%,
            rgba(100, 200, 255, 0.02) 50%,
            transparent 100%);
    transform: rotate(15deg);
    animation: ray-shimmer 8s ease-in-out infinite;
    will-change: opacity;
}

@keyframes ray-shimmer {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.7;
    }
}

/* ===== Bubbles ===== */
.bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    contain: strict;
}

.bubble {
    position: absolute;
    bottom: -20px;
    background: radial-gradient(circle at 30% 30%,
            rgba(255, 255, 255, 0.5) 0%,
            rgba(100, 200, 255, 0.25) 50%,
            rgba(50, 150, 200, 0.1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    animation: bubble-rise linear infinite;
    will-change: transform, opacity;
}

.bubble.glow {
    box-shadow: 0 0 8px rgba(100, 200, 255, 0.5), inset 0 0 6px rgba(255, 255, 255, 0.3);
}

@keyframes bubble-rise {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }

    10% {
        opacity: 0.7;
    }

    50% {
        transform: translateY(-50vh) translateX(15px) scale(1.05);
    }

    90% {
        opacity: 0.4;
    }

    100% {
        transform: translateY(-100vh) translateX(-10px) scale(0.9);
        opacity: 0;
    }
}

/* ===== Floating Particles ===== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    contain: strict;
}

.particle {
    position: absolute;
    background: rgba(200, 230, 255, 0.4);
    border-radius: 50%;
    animation: particle-drift linear infinite;
    will-change: transform;
}

@keyframes particle-drift {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }

    20% {
        opacity: 0.6;
    }

    80% {
        opacity: 0.4;
    }

    100% {
        transform: translateY(-30vh) translateX(50px);
        opacity: 0;
    }
}

/* ===== Main Container ===== */
.container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

/* ===== Logo Section ===== */
.logo-section {
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    height: 150px;
    background: radial-gradient(ellipse, var(--glow-teal) 0%, transparent 70%);
    filter: blur(40px);
    z-index: -1;
    animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.logo-image {
    max-width: 100%;
    width: clamp(280px, 80vw, 450px);
    height: auto;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 4px 20px rgba(0, 217, 255, 0.3));
}

.tagline {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
}

/* ===== Server Info Section ===== */
.server-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.ip-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.ip-container:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-glow);
    transform: translateY(-2px);
    box-shadow:
        0 10px 40px -10px rgba(0, 217, 255, 0.3),
        0 0 0 1px var(--border-glow);
}

.ip-container:active {
    transform: translateY(0);
}

.ip-icon {
    color: var(--primary-teal);
    display: flex;
    align-items: center;
}

.ip-address {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-primary);
}

.copy-tooltip {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    color: var(--primary-teal);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.copy-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--border-glow);
}

.copy-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ===== Player Count ===== */
.player-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 50px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
    animation: pulse 2s ease-in-out infinite;
}

.status-dot.online {
    background: var(--accent-emerald);
    box-shadow: 0 0 10px var(--accent-emerald);
}

.status-dot.offline {
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
    animation: none;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.players-online {
    font-weight: 600;
    color: var(--text-primary);
}

.players-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== Navigation Buttons ===== */
.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.nav-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 2rem;
    min-width: 120px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.nav-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-button:hover::before {
    opacity: 1;
}

.nav-button:hover {
    transform: translateY(-4px);
}

.button-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

/* Store Button */
.store-btn .button-icon {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.store-btn:hover {
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 10px 40px -10px rgba(251, 191, 36, 0.3);
}

.store-btn:hover .button-icon {
    background: rgba(251, 191, 36, 0.25);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
}

/* Rules Button */
.rules-btn .button-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.rules-btn:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 10px 40px -10px rgba(59, 130, 246, 0.3);
}

.rules-btn:hover .button-icon {
    background: rgba(59, 130, 246, 0.25);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* Discord Button */
.discord-btn .button-icon {
    background: rgba(88, 101, 242, 0.15);
    color: #5865f2;
}

.discord-btn:hover {
    border-color: rgba(88, 101, 242, 0.4);
    box-shadow: 0 10px 40px -10px rgba(88, 101, 242, 0.3);
}

.discord-btn:hover .button-icon {
    background: rgba(88, 101, 242, 0.25);
    box-shadow: 0 0 20px rgba(88, 101, 242, 0.3);
}

/* Vote Button */
.vote-btn-nav .button-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.vote-btn-nav:hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 10px 40px -10px rgba(16, 185, 129, 0.3);
}

.vote-btn-nav:hover .button-icon {
    background: rgba(16, 185, 129, 0.25);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

/* ===== Footer ===== */
.footer {
    margin-top: 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ===== Responsive Design ===== */
@media (max-width: 480px) {
    .container {
        padding: 1.5rem;
        gap: 2rem;
    }

    .logo-image {
        width: 260px;
    }

    .tagline {
        font-size: 0.95rem;
    }

    .ip-address {
        font-size: 1rem;
    }

    .button-group {
        gap: 0.75rem;
    }

    .nav-button {
        padding: 1rem 1.5rem;
        min-width: 100px;
        font-size: 0.9rem;
    }

    .button-icon {
        width: 40px;
        height: 40px;
    }

    .button-icon svg {
        width: 20px;
        height: 20px;
    }

    .vote-grid {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Back Button ===== */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.back-button:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-glow);
    color: var(--primary-teal);
    transform: translateX(-4px);
}

.back-button svg {
    transition: transform 0.3s ease;
}

.back-button:hover svg {
    transform: translateX(-3px);
}

/* ===== Page Headers ===== */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-title {
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ===== Vote Page ===== */
.vote-reward-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 16px;
    margin-bottom: 2rem;
}

.reward-icon {
    font-size: 2.5rem;
}

.reward-text h3 {
    color: var(--accent-emerald);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.reward-text p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.vote-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.vote-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.vote-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    box-shadow: 0 10px 40px -10px rgba(0, 217, 255, 0.3);
}

.vote-icon {
    font-size: 2rem;
}

.vote-card h3 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.vote-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.vote-btn {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-blue));
    border-radius: 8px;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
}

.vote-instructions {
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.vote-instructions h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.vote-instructions ol {
    color: var(--text-secondary);
    padding-left: 1.25rem;
    line-height: 1.8;
}

/* ===== News Section ===== */
.news-section {
    width: 100%;
    margin-top: 1rem;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.news-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.news-card {
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.news-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-2px);
}

.news-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.news-badge.update {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.news-badge.event {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
}

.news-badge.announcement {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.news-card h3 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.news-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.news-date {
    color: var(--text-secondary);
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.75rem;
}