/* --- Modal (Popup) Stilleri --- */

/* Modal'ın kapsayıcısı (Arka plan karartma) */
.custom-modal {
    display: none; /* EN ÖNEMLİ KISIM: Başlangıçta gizli olsun */
    position: fixed; /* Sayfa kaydırılsa bile ekranda sabit dursun */
    z-index: 9999; /* En üstte görünsün */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Arkası hafif siyah olsun */
    align-items: center; /* Dikey ortalama */
    justify-content: center; /* Yatay ortalama */
}

/* Modal görünür olduğunda (JS bu sınıfı ekleyecek) */
.custom-modal.active {
    display: flex !important; /* Görünür yap */
}

/* Modal kutusunun kendisi */
.modal-box {
    background: #fff; /* Arka plan rengi */
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    min-width: 300px;
    max-width: 90%;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease-in-out;
}

/* Ufak bir animasyon */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Glass Panel ile uyumlu olması için (Register sayfasındaki stil) */
.glass-panel {
    background: rgba(20, 20, 20, 0.85); /* Koyu transparan */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.3); /* Altın rengi çerçeve */
}


/* Professional Reset & Variables */
:root {
    /* Primary Colors */
    --primary-red: #8B0000;
    --primary-gold: #D4AF37;
    /* Metallic Gold */
    --accent-gold: #FFD700;
    /* Bright Gold */

    /* Backgrounds */
    --bg-dark: #0a0a0a;
    --bg-overlay: rgba(0, 0, 0, 0.75);
    --glass-bg: rgba(20, 20, 20, 0.65);
    --glass-border: rgba(255, 215, 0, 0.15);

    /* Text */
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --text-highlight: #ffffff;

    /* Effects */
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --glow-gold: 0 0 15px rgba(212, 175, 55, 0.3);
    --transition-smooth: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Serif SC', serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    background-image: url('../images/hero.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Glassmorphism Utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.9) 100%);
    position: relative;
    z-index: 1;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    /* Force on top of EVERYTHING */
    pointer-events: none;
}

/* Navbar - Modern & Sticky */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 2rem;
    transition: var(--transition-smooth);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.game-title {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--primary-gold);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
    font-weight: 700;
}

.subtitle {
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 4px;
    margin-top: -5px;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-item {
    color: var(--text-main);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition-smooth);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gold);
    transition: var(--transition-smooth);
    box-shadow: var(--glow-gold);
}

.nav-item:hover,
.nav-item.active {
    color: var(--primary-gold);
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 100%;
}

/* Login Button Specific Style */
.nav-btn-login {
    border: 1px solid var(--primary-gold);
    padding: 0.5rem 1.5rem !important;
    border-radius: 4px;
    background: rgba(212, 175, 55, 0.1);
    transition: all 0.3s ease;
}

.nav-btn-login::after {
    display: none;
}

.nav-btn-login:hover {
    background: var(--primary-gold);
    color: #000 !important;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
}

/* Hero Section - Immersive */
.content-wrapper {
    flex: 1;
    width: 100%;
    max-width: 100%;
    /* Full width for hero */
    padding: 0;
    padding-top: 80px;
    /* Offset for fixed header */
    display: flex;
    flex-direction: column;
}

.hero-section {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 2rem;

}

.hero-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) -10%);
    z-index: -1;
}

.hero-section h2 {
    font-family: 'Cinzel', serif;
    font-size: 4rem;
    background: linear-gradient(to bottom, #FFD700, #DAA520);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
    animation: fadeInDown 1s ease-out;
}

.hero-section p {
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: 3rem;
    color: var(--text-main);
    animation: fadeIn 1.5s ease-out;
}

/* Buttons - Premium */
.cta-button {
    display: inline-flex;
    /* Better alignment */
    justify-content: center;
    align-items: center;
    background: transparent;
    color: var(--primary-gold);
    padding: 1rem 3.5rem;
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    text-decoration: none;
    border: 1px solid var(--primary-gold);
    transition: var(--transition-smooth);
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-gold);
    transition: var(--transition-smooth);
    z-index: -1;
}

.cta-button:hover {
    color: #000;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    transform: translateY(-3px);
}

.cta-button:hover::before {
    left: 0;
}

/* Sidebar Container - Holds all widgets */
.sidebar-container {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    width: 250px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Widget Card - Unified Style */
.widget-card {
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    /* Gold border */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: var(--transition-smooth);
}

.widget-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
    border-color: var(--primary-gold);
}

/* Discord Widget Specifics */
.discord-widget {
    padding: 1.5rem;
    text-align: center;
    background: linear-gradient(145deg, rgba(88, 101, 242, 0.1) 0%, rgba(15, 15, 15, 0.95) 100%);
    border-color: rgba(88, 101, 242, 0.3);
}

.discord-widget:hover {
    border-color: #5865F2;
    /* Discord brand color */
    box-shadow: 0 10px 30px rgba(88, 101, 242, 0.2);
}

.discord-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.discord-icon {
    width: 24px;
    height: 24px;
    color: #5865F2;
}

.discord-count {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    font-family: 'Cinzel', serif;
    line-height: 1;
    margin-bottom: 0.2rem;
    text-shadow: 0 0 20px rgba(88, 101, 242, 0.5);
}

.discord-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.discord-btn {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background: #5865F2;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    transition: background 0.3s;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.discord-btn:hover {
    background: #4752c4;
}

.widget-title {
    background: linear-gradient(90deg, #111 0%, #222 100%);
    padding: 1rem 1.5rem;
    margin: 0;
    font-family: 'Cinzel', serif;
    color: var(--primary-gold);
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget-title::before {
    content: '◆';
    font-size: 0.8rem;
    color: var(--accent-gold);
}

.server-status {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.status-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.status-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.status-value {
    color: #fff;
    font-weight: 700;
    font-family: 'Cinzel', serif;
}

.online-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(46, 204, 113, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #2ecc71;
    border-radius: 50%;
    box-shadow: 0 0 8px #2ecc71;
    animation: pulse 2s infinite;
}

.online-text {
    color: #2ecc71;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}


/* Footer */
.main-footer {
    background: #050505;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3rem 2rem;
    text-align: center;
    color: #555;
    font-size: 0.9rem;
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .main-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        background: rgba(0, 0, 0, 0.95);
    }

    .hero-section h2 {
        font-size: 2.5rem;
    }

    .main-nav {
        gap: 1rem;
        font-size: 0.8rem;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Form Styling - Modern */
.auth-form {
    background: transparent;
    padding: 0;
    max-width: 400px;
    margin: 4rem auto;
}

.form-group label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 1rem;
    transition: var(--transition-smooth);
    font-size: 1rem;
}

.form-group input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-gold);
}

/* Cards (Download/Store) */
.download-grid {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.download-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    /* Minimal radius */
    padding: 3rem 2rem;
    transition: var(--transition-smooth);
}

.download-card:hover {
    /* Hover lift */
    transform: translateY(-10px);
    border-color: var(--primary-gold);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

/* Ranking Tabs */
.ranking-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 0.8rem 2rem;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.tab-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    color: var(--primary-gold);
    border-color: var(--primary-gold);
}

.tab-btn.active {
    background: var(--primary-gold);
    color: #000;
    border-color: var(--primary-gold);
    font-weight: bold;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.tab-content.active {
    display: block;
}

/* Ranking Table - Clean */
.ranking-table {
    width: 100%;
    max-width: 1000px;
    margin: 4rem auto;
    border-collapse: separate;
    border-spacing: 0 8px;
    /* Spacing between rows */
}

.ranking-table th {
    padding: 1.5rem;
    font-family: 'Cinzel', serif;
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
}

.ranking-table td {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    transition: var(--transition-smooth);
}

.ranking-table tr:hover td {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.01);
}

.ranking-table tr td:first-child {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.ranking-table tr td:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* News Section */
.news-section {
    padding: 4rem 2rem;
    max-width: 1400px;
    /* Increased width to fit 3 cards comfortably */
    margin: 0 auto;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    color: var(--primary-gold);
    text-align: center;
    margin-bottom: 3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-gold);
    margin: 1rem auto 0;
    box-shadow: var(--glow-gold);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Force 3 columns */
    gap: 2rem;
}

/* Responsive adjustment for News */
@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        /* Revert to auto-fit on smaller screens */
    }

    .server-status-panel {
        transform: scale(0.8) translateY(-50%);
        right: -50px;
        /* Hide partially */
    }

    .server-status-panel:hover {
        transform: scale(1) translateY(-50%);
        right: 0;
    }
}

.news-card {
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    /* For image zoom */
    transition: var(--transition-smooth);
    position: relative;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.news-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.news-date {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary-gold);
    color: #000;
    padding: 0.3rem 0.8rem;
    font-weight: bold;
    font-size: 0.8rem;
    border-radius: 2px;
}

.news-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-title {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: var(--text-highlight);
    margin-bottom: 0.8rem;
    text-decoration: none;
}

.news-excerpt {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

.read-more {
    color: var(--primary-gold);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    align-self: flex-start;
    transition: var(--transition-smooth);
}

.read-more:hover {
    color: #fff;
    letter-spacing: 1px;
}

/* Class Showcase */
.classes-section {
    padding: 5rem 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(20, 20, 20, 0.95), rgba(0, 0, 0, 0.8));
    overflow: hidden;
}

.class-showcase-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.class-card {
    position: relative;
    width: 250px;
    height: 400px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    overflow: hidden;
    filter: grayscale(80%);
}

.class-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 60%);
    z-index: 1;
}

.class-card:hover {
    width: 350px;
    /* Expand effect */
    filter: grayscale(0%);
    border-color: var(--primary-gold);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
    z-index: 5;
}

.class-info {
    position: absolute;
    bottom: 2rem;
    left: 1.5rem;
    z-index: 2;
    transform: translateY(20px);
    transition: transform 0.4s;
}

.class-card:hover .class-info {
    transform: translateY(0);
}

.class-name {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: var(--primary-gold);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.class-desc {
    color: #ddd;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
    transition-delay: 0.1s;
    max-width: 250px;
}

.class-card:hover .class-desc {
    opacity: 1;
    transform: translateY(0);
}

/* Community Hub */
.community-section {
    padding: 4rem 2rem;
    text-align: center;
    background: radial-gradient(circle at center, rgba(30, 30, 30, 0.8) 0%, rgba(0, 0, 0, 0) 70%);
}

.social-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.social-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(20, 20, 20, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    width: 350px;
    /* Wider */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy transition */
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.social-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}

.social-card:hover::before {
    transform: translateX(100%);
}

.social-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
}

.social-card.discord {
    border-bottom: 3px solid #5865F2;
}

.social-card.facebook {
    border-bottom: 3px solid #1877F2;
}

.social-card.discord:hover {
    border-color: #5865F2;
    background: linear-gradient(145deg, rgba(88, 101, 242, 0.1) 0%, rgba(20, 20, 20, 0.9) 100%);
    box-shadow: 0 0 30px rgba(88, 101, 242, 0.2);
}

.social-card.facebook:hover {
    border-color: #1877F2;
    background: linear-gradient(145deg, rgba(24, 119, 242, 0.1) 0%, rgba(20, 20, 20, 0.9) 100%);
    box-shadow: 0 0 30px rgba(24, 119, 242, 0.2);
}

.social-icon {
    font-size: 2.5rem;
}

.social-text h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
    color: #fff;
    text-align: left;
}

.social-text p {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: left;
}

.section-subtitle {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem auto;
    text-align: center;
}