/* Color Palette & Variables */
:root {
    --bg-dark: #0a0a0c;
    --bg-card: #141418;
    --bg-card-hover: #1c1c22;
    --primary-red: #ff2a2a;
    --primary-red-glow: rgba(255, 42, 42, 0.5);
    --secondary-yellow: #facc15;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --neon-cyan: #00f3ff;
    
    --font-heading: 'Teko', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    text-transform: uppercase;
}

h2 {
    font-size: 3rem;
    letter-spacing: 2px;
}

h2 span {
    color: var(--primary-red);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-outline {
    display: inline-block;
    padding: 12px 28px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-red);
    color: white;
}

.btn-primary:hover {
    background-color: #ff4d4d;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px var(--primary-red-glow);
}

.btn-primary.glow {
    box-shadow: 0 0 15px var(--primary-red-glow);
    animation: pulse 2s infinite;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    border-color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-red);
    color: var(--primary-red);
    padding: 8px 20px;
}

.btn-outline:hover {
    background: var(--primary-red);
    color: white;
}

.width-100 {
    width: 100%;
}

@keyframes pulse {
    0% { box-shadow: 0 0 15px var(--primary-red-glow); }
    50% { box-shadow: 0 0 25px var(--primary-red-glow); }
    100% { box-shadow: 0 0 15px var(--primary-red-glow); }
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(10, 10, 12, 0.9);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 2px solid rgba(255, 42, 42, 0.3);
}

.logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.logo span {
    color: var(--primary-red);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links li a {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-red);
    transition: var(--transition);
}

.nav-links li a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5%;
    position: relative;
    background: url('hero_background.jpg') center/cover no-repeat;
    margin-top: 0;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(10,10,12,0.95) 0%, rgba(10,10,12,0.7) 50%, rgba(10,10,12,0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    width: 100%;
}

.hero .subtitle {
    color: var(--secondary-yellow);
    font-size: 1.5rem;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
}

.hero .title {
    font-size: 5rem;
    line-height: 0.9;
    margin-bottom: 1.5rem;
    text-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.hero .description {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.stats-bar {
    display: flex;
    gap: 3rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
}

.stat {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat i {
    color: var(--primary-red);
}

/* Common Section Styles */
.section {
    padding: 6rem 5%;
}

.dark-bg {
    background-color: #050506;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.align-left {
    text-align: left;
}

/* Schedule Grid */
.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.schedule-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 5px;
    border-left: 4px solid #333;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.schedule-card:hover {
    transform: translateY(-5px);
    background: var(--bg-card-hover);
    border-left-color: var(--primary-red);
}

.schedule-card.special {
    border: 1px solid var(--secondary-yellow);
    border-left: 4px solid var(--secondary-yellow);
    background: linear-gradient(135deg, rgba(20,20,24,1) 0%, rgba(40,35,0,0.5) 100%);
}

.map-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 3px;
    text-transform: uppercase;
}

.map-tag.bermuda { background: rgba(46, 204, 113, 0.2); color: #2ecc71; }
.map-tag.purgatory { background: rgba(155, 89, 182, 0.2); color: #9b59b6; }
.map-tag.kalahari { background: rgba(230, 126, 34, 0.2); color: #e67e22; }

.schedule-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.date-time {
    color: var(--secondary-yellow);
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.schedule-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Prize Pool */
.prize-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 2rem;
    margin-top: 2rem;
}

.prize-tier {
    background: var(--bg-card);
    padding: 2rem;
    text-align: center;
    border-radius: 10px 10px 0 0;
    width: 30%;
    position: relative;
    border-top: 3px solid;
}

.prize-tier.champion {
    border-color: gold;
    height: 350px;
    transform: scale(1.05);
    z-index: 2;
    background: linear-gradient(to bottom, #2a2500, var(--bg-card));
}

.prize-tier.runner-up {
    border-color: silver;
    height: 300px;
}

.prize-tier.third-place {
    border-color: #cd7f32;
    height: 280px;
}

.tier-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.prize-tier h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.prize-tier .reward {
    font-size: 2.5rem;
    font-family: var(--font-heading);
    color: white;
    margin-bottom: 0.5rem;
}

.prize-tier p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Leaderboard */
.table-responsive {
    overflow-x: auto;
}

.leaderboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.leaderboard-table th, .leaderboard-table td {
    padding: 1.2rem;
    text-align: left;
}

.leaderboard-table th {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.leaderboard-table tbody tr {
    background: var(--bg-card);
    transition: var(--transition);
}

.leaderboard-table tbody tr:hover {
    background: var(--bg-card-hover);
    transform: scale(1.01);
}

.leaderboard-table tbody tr.top-rank {
    border-left: 3px solid var(--secondary-yellow);
}

.leaderboard-table tbody tr.top-rank:nth-child(1) { border-left-color: gold; }
.leaderboard-table tbody tr.top-rank:nth-child(2) { border-left-color: silver; }
.leaderboard-table tbody tr.top-rank:nth-child(3) { border-left-color: #cd7f32; }

.leaderboard-table .points {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    color: var(--primary-red);
    font-weight: bold;
}

/* Rules & Community (Two Col) */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

/* Accordion */
.accordion-item {
    background: var(--bg-card);
    margin-bottom: 1rem;
    border-radius: 5px;
    overflow: hidden;
}

.accordion-header {
    padding: 1.5rem;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.02);
}

.accordion-header:hover {
    background: rgba(255,255,255,0.05);
}

.accordion-content {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--text-muted);
}

.accordion-item.active .accordion-content {
    padding: 1.5rem;
    max-height: 200px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.accordion-item.active .accordion-header i {
    transform: rotate(180deg);
}

/* Social & Contact */
.social-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 5px;
    border-left: 4px solid transparent;
    transition: var(--transition);
}

.social-card:hover {
    transform: translateY(-5px) scale(1.02);
}

.social-card.discord:hover { border-color: #5865F2; background: rgba(88, 101, 242, 0.1); box-shadow: 0 10px 20px rgba(88, 101, 242, 0.2); }
.social-card.instagram:hover { border-color: #E1306C; background: rgba(225, 48, 108, 0.1); box-shadow: 0 10px 20px rgba(225, 48, 108, 0.2); }
.social-card.telegram:hover { border-color: #0088cc; background: rgba(0, 136, 204, 0.1); box-shadow: 0 10px 20px rgba(0, 136, 204, 0.2); }
.social-card.youtube:hover { border-color: #FF0000; background: rgba(255, 0, 0, 0.1); box-shadow: 0 10px 20px rgba(255, 0, 0, 0.2); }

.social-card i {
    font-size: 2.5rem;
    transition: transform 0.3s;
}

.social-card:hover i {
    transform: scale(1.1);
}

.social-card.discord i { color: #5865F2; }
.social-card.instagram i { color: #E1306C; }
.social-card.telegram i { color: #0088cc; }
.social-card.youtube i { color: #FF0000; }

.contact-form {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 5px;
}

.contact-form h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 1rem;
    margin-bottom: 1rem;
    color: white;
    font-family: var(--font-body);
    border-radius: 3px;
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-red);
}

/* Footer */
footer {
    background: #000;
    padding: 4rem 5% 2rem;
    text-align: center;
    border-top: 1px solid rgba(255,42,42,0.3);
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.footer-logo span { color: var(--primary-red); }

.footer-content p {
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto 2rem;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.footer-socials a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.footer-socials a:hover {
    background: var(--primary-red);
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Notification Dropdown */
.notification-container {
    position: relative;
    display: inline-block;
    margin-right: 15px;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--neon-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: white;
    transition: var(--transition);
    position: relative;
}

.notification-icon:hover {
    background: var(--neon-cyan);
    color: #000;
    box-shadow: 0 0 10px var(--neon-cyan);
}

.unread-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background-color: var(--primary-red);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary-red);
    display: none; /* Shown via JS when unread */
}

.notification-dropdown {
    position: absolute;
    top: 120%;
    right: -10px; /* shift slightly to align middle */
    width: 320px;
    max-height: 400px;
    background: #000000;
    border: 1px solid var(--neon-cyan);
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.notification-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-list {
    list-style: none;
    padding: 0;
    overflow-y: auto;
    flex-grow: 1;
    max-height: 250px;
}

.notification-list::-webkit-scrollbar {
    width: 5px;
}
.notification-list::-webkit-scrollbar-track {
    background: #111;
}
.notification-list::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
}

.notif-item {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.notif-item.unread {
    background: rgba(0, 243, 255, 0.05);
    border-left: 3px solid var(--neon-cyan);
}

.notif-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.notif-msg {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.3;
}

/* Profile Dropdown */
.profile-dropdown-container {
    position: relative;
    display: inline-block;
}

.profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--primary-red);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: white;
    transition: var(--transition);
}

.profile-icon:hover {
    background: var(--primary-red);
    box-shadow: 0 0 10px var(--primary-red-glow);
}

.profile-dropdown {
    display: none;
    position: absolute;
    top: 120%;
    right: 0;
    width: 250px;
    background: #1a1a1a;
    border: 1px solid red;
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    z-index: 1000;
}

.profile-dropdown.active {
    display: block;
}

.profile-header {
    padding: 1.5rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,42,42,0.3);
}

.profile-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-id {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.profile-menu {
    list-style: none;
    padding: 0.5rem 0;
}

.profile-menu li a {
    display: flex;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    transition: var(--transition);
    align-items: center;
    gap: 12px;
}

.profile-menu li a:hover {
    background: rgba(255,255,255,0.05);
    color: var(--primary-red);
}

.profile-menu li a.logout-text {
    color: var(--primary-red);
}

.profile-menu li a.logout-text:hover {
    background: rgba(255,42,42,0.1);
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .hero .title { font-size: 3rem; }
    .hero .stats-bar { flex-direction: column; gap: 1rem; }
}

@keyframes pulse-live {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.02); }
    100% { opacity: 1; transform: scale(1); }
}

.live-badge {
    animation: pulse-live 1.5s infinite ease-in-out;
}

@media (max-width: 991px) {
    .hero .title { font-size: 3.5rem; }
    .two-col { grid-template-columns: 1fr; }
    .prize-container { flex-direction: column; align-items: center; }
    .prize-tier { width: 100%; max-width: 400px; height: auto !important; margin-bottom: 1rem; border-top: none; border-left: 4px solid; }
    .prize-tier.champion { transform: scale(1); }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-dark);
        flex-direction: column;
        padding: 2rem;
        text-align: center;
        border-bottom: 2px solid var(--primary-red);
    }
    
    .nav-links.active { display: flex; }
    
    .mobile-menu-toggle { display: block; }
    
    .hero-buttons { flex-direction: column; width: 100%; }
    .hero-buttons a { text-align: center; }
    
    .stats-bar { flex-direction: column; gap: 1rem; border: none; }
}

/* Wallet Modal */
.wallet-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.wallet-modal {
    background: #0a0a0c;
    border: 1px solid var(--primary-red);
    border-radius: 5px;
    width: 90%;
    max-width: 600px;
    padding: 2rem;
    position: relative;
    box-shadow: 0 10px 30px rgba(255, 42, 42, 0.2);
    max-height: 85vh;
    overflow-y: auto;
}

.wallet-modal::-webkit-scrollbar {
    width: 6px;
}
.wallet-modal::-webkit-scrollbar-track {
    background: #0a0a0c;
    border-radius: 5px;
}
.wallet-modal::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 5px;
}
.modal-close {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}
.modal-close:hover { color: var(--primary-red); }
.modal-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem;
}
.modal-header h2 { font-size: 2rem; margin: 0; }
.balances-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem;
}
.balance-card {
    background: var(--bg-card); padding: 1.5rem 1rem; border-radius: 5px; text-align: center; border-bottom: 2px solid var(--primary-red);
}
.balance-card i { font-size: 2rem; margin-bottom: 0.5rem; color: var(--text-muted); }
.balance-card h4 { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.balance-card .amount { font-family: var(--font-heading); font-size: 1.8rem; color: white; }
.withdraw-form-container {
    background: rgba(255,255,255,0.02); padding: 1.5rem; border-radius: 5px; margin-top: 1.5rem; display: none; border: 1px solid rgba(255,255,255,0.1);
}
.withdraw-form-container.active { display: block; }
@media (max-width: 600px) {
    .balances-grid { grid-template-columns: 1fr; }
    .modal-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* Progress Bar for Match Cards */
.progress-container {
    width: 100%;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    height: 6px;
    margin: 8px 0 12px 0;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--neon-cyan);
    border-radius: 10px;
    transition: width 0.3s ease;
    box-shadow: 0 0 5px var(--neon-cyan);
}

.slot-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-weight: bold;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .navbar {
        padding: 0.8rem 15px;
    }
    
    .logo {
        font-size: 1.4rem;
    }

    .wallet-text {
        display: none;
    }

    .nav-actions {
        gap: 0.5rem;
        flex-wrap: nowrap;
        align-items: center;
        position: relative;
        z-index: 1001;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-toggle {
        display: none !important;
    }

    .hero .title {
        font-size: 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .stats-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        text-align: center;
    }

    .section {
        padding: 3rem 15px;
    }

    .container, .auth-container, .rules-container, .community-container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .btn-primary, .btn-secondary, .btn-outline, button {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .profile-icon {
        flex-shrink: 0;
    }

    .notification-dropdown {
        position: fixed;
        top: 80px;
        left: 5%;
        width: 90%;
        right: auto;
    }

    .logo-text {
        display: none;
    }

    .tx-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .tx-header h2 {
        font-size: 1.8rem;
    }

    .tx-header .btn-outline {
        font-size: 0.9rem;
        padding: 5px 12px;
        min-height: 36px;
    }

    .tx-table {
        width: 100%;
    }

    .tx-table th, .tx-table td {
        font-size: 0.85rem;
        padding: 8px 5px;
    }
}
