/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #5865F2;
    --secondary-color: #7289DA;
    --accent-color: #FF6B6B;
    --dark-bg: #0F0F1E;
    --darker-bg: #0A0A14;
    --card-bg: #1A1A2E;
    --text-primary: #FFFFFF;
    --text-secondary: #B9BBBE;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 12px 48px rgba(88, 101, 242, 0.4);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 900;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.btn-invite {
    background: var(--gradient-1);
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    color: white !important;
}

/* Hero Section */
.hero {
    padding: 150px 0 80px;
    background: var(--darker-bg);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--gradient-1);
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.2;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(10deg); }
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 5s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 2rem;
}

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

.btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

.btn-discord {
    background: #5865F2;
    color: white;
}

.btn-discord:hover {
    background: #4752C4;
}

.btn-large {
    padding: 1.25rem 3rem;
    font-size: 1.125rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Ad Container */
.ad-container, .ad-section {
    margin: 2rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Features Section */
.features {
    padding: 80px 0;
    background: var(--dark-bg);
}

.section-title {
    font-size: 3rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-secondary);
}

/* Rules Section */
.rules {
    padding: 80px 0;
    background: var(--darker-bg);
}

.rules-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.phase-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.phase {
    display: flex;
    gap: 1.5rem;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 16px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.phase:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow);
}

.phase-number {
    min-width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 900;
    flex-shrink: 0;
}

.phase-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.phase-duration {
    display: inline-block;
    background: rgba(88, 101, 242, 0.2);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.phase-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.rules-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.rule-box {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.rule-box h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.rule-box p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.rule-box ul {
    list-style: none;
    margin-left: 0;
}

.rule-box li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.rule-box .small {
    font-size: 0.85rem;
    font-style: italic;
    opacity: 0.7;
}

/* Leaderboard Section */
.leaderboard {
    padding: 80px 0;
    background: var(--dark-bg);
}

.leaderboard-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--card-bg);
    border: 2px solid transparent;
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--gradient-1);
    color: white;
}

.leaderboard-table {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: rgba(88, 101, 242, 0.1);
}

th, td {
    padding: 1rem;
    text-align: left;
}

th {
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 1px;
}

tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease;
}

tbody tr:hover {
    background: rgba(88, 101, 242, 0.05);
}

tbody tr:last-child {
    border-bottom: none;
}

td.loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
}

/* Dashboard Section */
.dashboard {
    padding: 80px 0;
    background: var(--darker-bg);
}

.dashboard-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.dashboard-auth {
    text-align: center;
    padding: 3rem;
}

.dashboard-content {
    margin-top: 2rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
}

.user-discrim {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-details {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-primary);
}

.recent-battles {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
}

.recent-battles h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.battles-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Invite Section */
.invite-section {
    padding: 100px 0;
    background: var(--dark-bg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.invite-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: var(--gradient-2);
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
}

.invite-content {
    position: relative;
    z-index: 1;
}

.invite-content h2 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.invite-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.permissions-note {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Footer */
.footer {
    background: var(--darker-bg);
    padding: 60px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

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

/* Responsive Design */
@media (max-width: 968px) {
    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        gap: 2rem;
    }

    .rules-content {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .hero {
        padding: 100px 0 50px;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

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

    .invite-content h2 {
        font-size: 2rem;
    }
}
