/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Roboto:wght@300;400;700&display=swap');

:root {
    --bg-dark: #050510;
    --bg-header: #0a0a1a;
    --bg-card: #111122;
    --accent-gold: #FFD700;
    --accent-silver: #C0C0C0;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --border-gold: 1px solid rgba(255, 215, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    background-image: var(--bg-image, none), radial-gradient(circle at 50% 0%, #1a1a3a 0%, transparent 60%);
    background-size: cover, auto;
    background-position: center top, center;
    background-attachment: fixed, scroll;
    background-repeat: no-repeat, no-repeat;
}

/* Particles Container */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    /* Behind content but above background */
    pointer-events: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
.nav-link,
.btn-cta,
.btn-submit {
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Header */
header {
    background-color: rgba(10, 10, 26, 0.95);
    border-bottom: var(--border-gold);
    position: fixed;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    display: flex;
    justify-content: center;
    backdrop-filter: blur(5px);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--accent-silver);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: color 0.3s, text-shadow 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 80px;
    position: relative;
    z-index: 5;
    /* Above particles */
}

.hero h1 {
    font-size: 4rem;
    color: var(--accent-gold);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    margin-bottom: 1rem;
}

.countdown-container {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
}

.countdown-item {
    background: rgba(0, 0, 0, 0.5);
    border: var(--border-gold);
    padding: 1rem 2rem;
    border-radius: 4px;
    min-width: 100px;
}

.countdown-number {
    font-size: 2.5rem;
    font-family: 'Cinzel', serif;
    color: var(--accent-silver);
    font-weight: bold;
    display: block;
}

.countdown-label {
    font-size: 0.8rem;
    color: var(--accent-gold);
}

.btn-cta {
    display: inline-block;
    background: linear-gradient(45deg, #b8860b, #ffd700);
    color: #000;
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 2px;
    margin-top: 2rem;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
}

/* Status Cards */
.server-status {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: -50px;
    position: relative;
    z-index: 10;
    padding: 0 2rem;
    flex-wrap: wrap;
}

.status-card {
    background: var(--bg-card);
    border: 1px solid #333;
    padding: 1.5rem;
    width: 300px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s, border-color 0.3s;
}

.status-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-gold);
}

.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.online {
    background-color: #00ff00;
    box-shadow: 0 0 10px #00ff00;
}

.offline {
    background-color: #ff0000;
    box-shadow: 0 0 10px #ff0000;
}

/* Features */
.features {
    padding: 4rem 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 5;
}

.feature-col {
    flex: 1;
    min-width: 300px;
    max-width: 350px;
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border-radius: 4px;
    border-left: 3px solid var(--accent-silver);
}

.feature-col.hardcore {
    border-color: #ff4444;
}

.feature-col.mid {
    border-color: var(--accent-gold);
}

.feature-col.high {
    border-color: #4444ff;
}

/* Rankings */
.rankings {
    max-width: 800px;
    margin: 4rem auto;
    background: var(--bg-card);
    border: var(--border-gold);
    position: relative;
    z-index: 5;
}

.ranking-tabs {
    display: flex;
    border-bottom: 1px solid #333;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 1rem;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.tab-btn.active {
    color: var(--accent-gold);
    background: rgba(255, 215, 0, 0.05);
}

.ranking-content {
    padding: 1rem;
    min-height: 200px;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
}

.ranking-table th,
.ranking-table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid #333;
}

.ranking-table th {
    color: var(--accent-gold);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    padding: 2rem;
    width: 400px;
    border: var(--border-gold);
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    color: var(--accent-silver);
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--accent-silver);
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    background: #050510;
    border: 1px solid #333;
    color: #fff;
    outline: none;
}

.form-group input:focus {
    border-color: var(--accent-gold);
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: var(--accent-gold);
    border: none;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    transition: transform 0.2s;
}

.btn-submit:hover {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero h4 {
        font-size: 0.9rem;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        padding: 0 1rem;
    }

    .nav-link {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }

    header {
        padding: 0.5rem 0;
    }

    .countdown-container {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .countdown-item {
        padding: 0.5rem;
        min-width: 60px;
    }

    .countdown-number {
        font-size: 1.5rem;
    }

    .server-status {
        flex-direction: column;
        padding: 1rem;
    }

    .status-card {
        transform: none !important;
        width: 100%;
    }

    .features-section {
        padding: 2rem 1rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 5vh auto;
        padding: 1.5rem;
    }

    .rankings-section {
        padding: 2rem 1rem;
    }
}

/* Footer Styling */
footer {
    background: #000;
    padding: 2rem;
    text-align: center;
    border-top: 1px solid #333;
    color: #666;
    position: relative;
    z-index: 10;
}

/* Page wrapper - do NOT use flex on body to avoid hero issues */
html {
    min-height: 100vh;
}

/* Loading States */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-top: -8px;
    margin-left: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Button hover improvements */
.btn-action {
    transition: all 0.3s ease;
}

.btn-action:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.btn-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Card improvements */
.char-card,
.status-card,
.feature-card,
.info-card {
    transition: all 0.3s ease;
}

.char-card:hover,
.feature-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-3px);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Navigation active state */
.nav-link.active {
    color: var(--accent-gold);
}

/* Toast/Alert styling - MUST be above modal (z-index: 2000) */
.swal2-container {
    z-index: 9999 !important;
}

.swal2-popup {
    background: #1a1a2e !important;
    border: 1px solid #333;
    z-index: 9999 !important;
}

.swal2-title,
.swal2-content {
    color: #fff !important;
}

/* Announcement bar animation */
.announcement-bar {
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Small screen adjustments */
@media (max-width: 480px) {
    .hero {
        padding-top: 100px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .btn-cta {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    nav ul li[style*="font-size: 1.5rem"] {
        display: none;
    }
}