@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600&family=Rajdhani:wght@500;600;700&display=swap');

:root {
    /* Kolorystyka pod nowe fioletowe logo ESRL */
    --bg-main: #0B0715;          /* Bardzo ciemny granato-fiolet */
    --bg-card: #150d29;          /* Nieco jaśniejszy fiolet na karty */
    --accent: #a855f7;           /* Żywy fioletowy/liliowy */
    --accent-hover: #c084fc;     /* Jaśniejszy fiolet po najechaniu */
    --accent-glow: rgba(168, 85, 247, 0.4); 
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #2e1e52;     /* Fioletowe krawędzie */
    
    /* Nowoczesne zaokrąglenia */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 50px;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: rgba(168, 85, 247, 0.3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(168, 85, 247, 0.6); }

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

body {
    background-color: var(--bg-main);
    background-image: linear-gradient(to bottom, rgba(11, 7, 21, 0.6) 0%, rgba(11, 7, 21, 0.95) 100%), url('/img/Tlo.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .nav-links a {
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Navbar (Glassmorphism) */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: rgba(11, 7, 21, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

/* Animated Logo and Text */
.logo-wrapper { display: flex; align-items: center; text-decoration: none; padding-left: 5px; }
.logo-img { height: 45px; border-radius: 50%; box-shadow: 0 0 15px var(--accent-glow), 0 0 30px var(--accent-glow); animation: logoSpin 25s infinite; z-index: 2; position: relative; }
.logo-text { font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 1.15rem; letter-spacing: 2px; color: #fff; text-shadow: 0 0 15px rgba(168, 85, 247, 0.6); white-space: nowrap; overflow: hidden; max-width: 0; opacity: 0; margin-left: 0; padding: 10px 0; display: inline-block; animation: textExpand 25s infinite; user-select: none; line-height: 1; }
.logo-text strong { font-weight: 900; background: linear-gradient(135deg, #e9d5ff, #a855f7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.6)); margin-right: 5px; display: inline-block; }

@keyframes logoSpin {
    0%, 60% { transform: rotate(0deg); animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1); }
    65%, 95% { transform: rotate(360deg); animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1); }
    100% { transform: rotate(0deg); }
}

@keyframes textExpand {
    0%, 60% { max-width: 0; opacity: 0; margin-left: 0; animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1); }
    65%, 95% { max-width: 450px; opacity: 1; margin-left: 15px; animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1); }
    100% { max-width: 0; opacity: 0; margin-left: 0; }
}

.nav-links { display: flex; gap: 25px; align-items: center; flex-wrap: wrap; }
.nav-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
}
.nav-links a i { margin-right: 6px; }
.nav-links a:hover { color: var(--text-main); background: rgba(168, 85, 247, 0.1); }
.nav-links a.active { color: #fff; background: rgba(168, 85, 247, 0.15); box-shadow: 0 0 20px rgba(168, 85, 247, 0.6), inset 0 0 10px rgba(168, 85, 247, 0.3); border: 1px solid var(--accent); }

.btn-steam {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: rgba(21, 13, 41, 0.75);
    color: var(--text-main);
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--accent);
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.25);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-steam i {
    font-size: 1.25rem;
    color: var(--accent);
    transition: color 0.3s ease, transform 0.3s ease;
}

.btn-steam:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent-hover);
    box-shadow: 0 0 25px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-steam:hover i {
    color: #fff;
    transform: scale(1.1);
}

.auth-btn.logout {
    background: transparent;
    color: var(--text-main);
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}
.auth-btn.logout:hover { background: rgba(255,255,255,0.05); border-color: var(--text-muted); }

/* Hero - Ultra Clean & Rounded */
.hero {
    height: 100vh;
    display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
}
.hero-content { display: flex; flex-direction: column; align-items: center; margin-top: 60px; }
.hero-title { font-size: 7rem; font-weight: 700; letter-spacing: 24px; color: #fff; line-height: 1; margin-right: -24px; text-transform: uppercase; font-family: 'Rajdhani', sans-serif; text-shadow: 0 0 40px rgba(168, 85, 247, 0.3); }
.hero-subtitle { font-size: 1.5rem; font-weight: 600; letter-spacing: 12px; color: var(--accent); line-height: 1; margin-top: 15px; margin-right: -12px; text-transform: uppercase; font-family: 'Montserrat', sans-serif; }

.hero-countdown { display: flex; align-items: center; gap: 40px; margin: 60px 0; background: rgba(21, 13, 41, 0.6); padding: 30px 50px; border-radius: var(--radius-lg); border: 1px solid var(--border-color); backdrop-filter: blur(10px); box-shadow: 0 20px 40px rgba(0,0,0,0.5); }
.cd-item { display: flex; flex-direction: column; align-items: center; }
.cd-val { font-size: 3.5rem; font-family: 'Rajdhani', sans-serif; font-weight: 600; color: #fff; line-height: 1; text-shadow: 0 0 15px var(--accent-glow); }
.cd-lbl { font-size: 0.75rem; color: var(--text-muted); letter-spacing: 4px; margin-top: 10px; text-transform: uppercase; }
.cd-sep { width: 1px; height: 50px; background: rgba(255,255,255,0.1); }

.btn-clean {
    padding: 16px 50px; font-size: 0.85rem; font-family: 'Montserrat', sans-serif; font-weight: 600;
    letter-spacing: 4px; text-transform: uppercase; color: #fff; background: var(--accent);
    border: none; border-radius: var(--radius-pill); transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1); cursor: pointer; text-decoration: none;
    box-shadow: 0 0 20px var(--accent-glow);
}
.btn-clean:hover { background: var(--accent-hover); box-shadow: 0 0 30px rgba(192, 132, 252, 0.6); transform: translateY(-3px); }

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 12px 28px;
    font-size: 0.95rem;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 1px;
    border-radius: var(--radius-pill);
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border: none;
}
.btn-primary { background: var(--accent); color: white; box-shadow: 0 4px 15px var(--accent-glow); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 6px 20px rgba(192, 132, 252, 0.5); transform: translateY(-2px); }
.btn-secondary { background: rgba(255,255,255,0.05); color: var(--text-main); border: 1px solid var(--border-color); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: var(--text-muted); transform: translateY(-2px); }

/* Layout & Cards */
.container { flex: 1; padding: 120px 5% 60px 5%; max-width: 1400px; margin: 0 auto; width: 100%; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }

.card {
    background: var(--bg-card);
    padding: 35px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(0,0,0,0.4); border-color: rgba(168, 85, 247, 0.3); }
.card h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    color: var(--text-main);
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 15px;
}
.card p { color: var(--text-muted); line-height: 1.6; font-size: 0.95rem; margin-bottom: 15px; }

/* Sponsors Special - CLEAN */
.sponsor-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--bg-card); padding: 40px; border-radius: var(--radius-md); border: 1px solid var(--border-color);
    transition: all 0.3s; text-align: center;
}
.sponsor-card:hover { border-color: var(--accent); transform: translateY(-5px); box-shadow: 0 10px 25px var(--accent-glow); }
.sponsor-card img {
    max-width: 130px; max-height: 70px; object-fit: contain; margin-bottom: 25px;
    filter: grayscale(100%); opacity: 0.6; transition: filter 0.3s, opacity 0.3s;
}
.sponsor-card:hover img { filter: grayscale(0%); opacity: 1; }
.sponsor-card h3 { font-size: 1rem; margin-bottom: 5px; color: var(--text-main); }
.sponsor-card p { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-family: 'Rajdhani', sans-serif; }

/* Profile/Admin Overrides */
.profile-header { display: flex; align-items: center; gap: 30px; margin-bottom: 30px; }
.profile-header img { width: 100px; height: 100px; border-radius: 50%; border: 3px solid var(--accent); padding: 4px; background: var(--bg-main); box-shadow: 0 0 20px var(--accent-glow); }
.profile-header h2 { border: none; padding: 0; margin-bottom: 5px; font-size: 2.2rem; }

/* Tables */
.table-container { overflow-x: auto; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-card); box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--border-color); font-size: 0.95rem; }
th { background: rgba(0,0,0,0.3); color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; font-family: 'Rajdhani', sans-serif; letter-spacing: 1px; }
tr:last-child td { border-bottom: none; }
tr { transition: background 0.2s; }
tr:hover td { background: rgba(168, 85, 247, 0.05); }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; font-family: 'Rajdhani', sans-serif; letter-spacing: 1px; font-weight: 600; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 14px; background: rgba(0,0,0,0.3); border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); color: var(--text-main); font-family: 'Montserrat', sans-serif; font-size: 0.95rem;
    transition: all 0.3s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 10px var(--accent-glow); background: rgba(0,0,0,0.5); }

/* Utils */
.badge { padding: 6px 14px; border-radius: var(--radius-pill); font-size: 0.75rem; font-weight: 600; background: rgba(168, 85, 247, 0.2); color: var(--accent); font-family: 'Rajdhani', sans-serif; letter-spacing: 1px; text-transform: uppercase; border: 1px solid rgba(168, 85, 247, 0.4); }
.text-accent { color: var(--accent); text-shadow: 0 0 10px var(--accent-glow); }

footer { text-align: center; padding: 40px 30px; border-top: 1px solid var(--border-color); color: var(--text-muted); margin-top: auto; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; font-family: 'Rajdhani', sans-serif; background: rgba(0,0,0,0.2); }
footer span { color: var(--text-main); font-weight: 600; }

/* Rulebook Specifics */
.rule-section { display: flex; gap: 30px; margin-bottom: 40px; padding-bottom: 30px; border-bottom: 1px dashed var(--border-color); transition: transform 0.3s; }
.rule-section:hover { transform: translateX(10px); }
.rule-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.rule-number { font-size: 3.5rem; font-family: 'Rajdhani', sans-serif; font-weight: 700; color: rgba(168, 85, 247, 0.15); line-height: 1; -webkit-text-stroke: 1px var(--accent); text-shadow: none; }
.rule-content h3 { font-size: 1.6rem; color: var(--text-main); margin-bottom: 15px; border: none; padding: 0; }
.rule-content ul { padding-left: 20px; color: var(--text-muted); line-height: 1.8; }
.rule-content li { margin-bottom: 10px; }
.text-main { color: var(--text-main); }
/* =========================================
   MOBILE RESPONSIVENESS
========================================= */
.mobile-menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--text-main);
    cursor: pointer;
    z-index: 1001;
}

.mobile-auth {
    display: none;
}

@media (max-width: 992px) {
    .nav-links {
        gap: 15px;
    }
    .hero-title {
        font-size: 5rem;
        letter-spacing: 15px;
    }
    .cd-val {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    /* Navbar adjustments */
    nav {
        padding: 15px 20px;
    }
    
    .logo-text {
        font-size: 0.9rem;
    }
    
    .desktop-auth {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(11, 7, 21, 0.95);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 20px;
        border-bottom: 1px solid var(--accent);
        box-shadow: 0 10px 30px rgba(0,0,0,0.8);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-in-out;
    }
    
    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    
    .nav-links a {
        margin: 0 !important;
        font-size: 1.1rem;
    }
    
    .mobile-auth {
        display: block;
        margin-top: 10px;
    }

    /* Hero section */
    .hero-title {
        font-size: 3rem;
        letter-spacing: 8px;
        margin-right: -8px;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        letter-spacing: 6px;
        margin-right: -6px;
        margin-top: 10px;
    }
    
    .hero-countdown {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
        margin: 40px 0;
    }
    
    .cd-sep {
        width: 50px;
        height: 1px;
    }
    
    .cd-val {
        font-size: 2rem;
    }
    
    /* Layouts */
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .profile-header, .profile-header-normal, .profile-header-admin {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-header-admin::before {
        display: none;
    }
}
