:root {
    --primary: #5865F2;
    --primary-dark: #4752c4;
    --bg: #000000;
    --bg-card: #101018;
    --bg-soft: #171725;
    --text: #ffffff;
    --muted: #aaaaaa;
    --gold: #f5c518;
    --line: rgba(255, 255, 255, 0.08);
}

body.light {
    --bg: #f2f2f7;
    --bg-card: #ffffff;
    --bg-soft: #eaeaf2;
    --text: #111111;
    --muted: #666666;
    --line: rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

/* ---- Preloader ---- */

.preloader {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    animation: preloaderFade 0.8s ease 1.2s forwards;
    pointer-events: none;
}

.preloader img {
    width: 90px;
    height: 90px;
    animation: preloaderPulse 1s ease-in-out infinite;
}

.preloader-text {
    color: var(--gold);
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 5px;
}

@keyframes preloaderPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.6; }
}

@keyframes preloaderFade {
    to { opacity: 0; visibility: hidden; }
}

/* ---- Entrance animations ---- */

main > section {
    animation: fadeUp 0.7s ease both;
}

main > section:nth-of-type(1) { animation-delay: 0.2s; }
main > section:nth-of-type(2) { animation-delay: 0.3s; }
main > section:nth-of-type(3) { animation-delay: 0.4s; }
main > section:nth-of-type(4) { animation-delay: 0.5s; }
main > section:nth-of-type(5) { animation-delay: 0.6s; }
main > section:nth-of-type(6) { animation-delay: 0.7s; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

/* ---- Navbar ---- */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    z-index: 200;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    transition: background 0.3s, box-shadow 0.3s;
}

body.light .navbar {
    background: rgba(255, 255, 255, 0.7);
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.85);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

body.light .navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.nav-logo img {
    width: 36px;
    height: 36px;
}

.nav-st {
    color: var(--gold);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

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

.theme-btn {
    background: var(--bg-card);
    border: 1px solid var(--line);
    color: var(--text);
    font-size: 1.1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

.theme-btn:hover {
    transform: scale(1.1);
}

/* ---- Animated background ---- */

.bg-anim {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.bg-anim::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        115deg,
        transparent 0px,
        transparent 40px,
        rgba(255, 255, 255, 0.08) 42px,
        rgba(255, 255, 255, 0.12) 46px,
        transparent 48px
    );
    animation: flowLines 6s linear infinite;
}

.bg-anim::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        115deg,
        transparent 0px,
        transparent 90px,
        rgba(255, 255, 255, 0.05) 91px,
        transparent 94px
    );
    animation: flowLines 9s linear infinite;
}

.particle {
    position: absolute;
    bottom: -30px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    opacity: 0.7;
    box-shadow: 0 0 12px currentColor, 0 0 25px currentColor;
    animation: particleFloat 14s ease-in-out infinite;
}

@keyframes particleFloat {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 0.8; }
    50% { transform: translateY(-50vh) translateX(40px); opacity: 1; }
    90% { opacity: 0.4; }
    100% { transform: translateY(-100vh) translateX(-30px); opacity: 0; }
}

body.light .bg-anim::before {
    background: repeating-linear-gradient(
        115deg,
        transparent 0px,
        transparent 40px,
        rgba(0, 0, 0, 0.05) 42px,
        rgba(0, 0, 0, 0.08) 46px,
        transparent 48px
    );
}

body.light .bg-anim::after {
    background: repeating-linear-gradient(
        115deg,
        transparent 0px,
        transparent 90px,
        rgba(0, 0, 0, 0.04) 91px,
        transparent 94px
    );
}

@keyframes flowLines {
    from { transform: translateX(-120px) translateY(-120px); }
    to { transform: translateX(120px) translateY(120px); }
}

/* ---- Hero ---- */

.hero {
    position: relative;
    z-index: 1;
    background: var(--bg);
    text-align: center;
    padding: 160px 20px 110px;
    border-bottom: 1px solid var(--line);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-kicker {
    display: inline-block;
    color: var(--gold);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 10px;
    margin-bottom: 15px;
}

.team-name {
    font-size: 6rem;
    font-weight: 900;
    letter-spacing: 6px;
    line-height: 1;
    color: var(--text);
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.25);
}

.team-name .st {
    background: linear-gradient(135deg, #f5c518, #ff8c00);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.hero-line {
    width: 80px;
    height: 3px;
    margin: 25px auto;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    border-radius: 2px;
}

.tagline {
    font-size: 1.15rem;
    color: var(--muted);
    letter-spacing: 2px;
}

/* ---- Layout ---- */

main {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 50px 20px;
}

.about, .join, .announcements, .members, .achievements {
    margin-bottom: 70px;
}

.about, .join {
    text-align: center;
}

h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--text);
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
}

h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 2px;
    margin: 12px auto 0;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.about p, .join p {
    color: var(--muted);
    max-width: 600px;
    margin: 20px auto 0;
}

/* ---- Stats ---- */

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 70px;
}

.stat-box {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 30px 15px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(245, 197, 24, 0.15);
}

.stat-number {
    font-size: 2.6rem;
    font-weight: 900;
    background: linear-gradient(135deg, #f5c518, #ff8c00);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: statGlow 2.5s ease-in-out infinite;
}

@keyframes statGlow {
    0%, 100% { filter: drop-shadow(0 0 6px rgba(245, 197, 24, 0.3)); }
    50% { filter: drop-shadow(0 0 18px rgba(245, 197, 24, 0.7)); }
}

.stat-label {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 5px;
}

/* ---- Announcements ---- */

.announcement-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
}

.announcement-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 15px 22px;
    transition: transform 0.2s, border-color 0.2s;
}

.announcement-item:hover {
    transform: translateX(6px);
    border-color: var(--gold);
}

.announcement-date {
    flex-shrink: 0;
    background: linear-gradient(135deg, #f5c518, #ff8c00);
    color: #000;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 8px;
    letter-spacing: 1px;
}

.announcement-text {
    color: var(--text);
}

/* ---- Members ---- */

.member-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.member-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 25px 15px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    border: 1px solid var(--line);
}

.member-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 0 25px rgba(88, 101, 242, 0.4);
    border-color: rgba(88, 101, 242, 0.6);
}

/* ---- Avatar ring ---- */

.avatar-ring {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-ring .avatar-spin {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #f5c518, #5865F2, #eb459e, #00a8fc, #f5c518);
    animation: spin 3s linear infinite;
}

.avatar-inner {
    position: relative;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    background: var(--primary);
    border: 4px solid var(--bg);
}

.avatar-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-dot {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid var(--bg-card);
}

.status-dot.online {
    background: #3ba55c;
    box-shadow: 0 0 10px #3ba55c;
}

.status-dot.offline {
    background: #5c5c5c;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ---- Member badges ---- */

.member-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.member-role {
    font-size: 0.85rem;
    color: var(--muted);
}

.member-note {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--gold);
    border: 1px solid var(--gold);
    border-radius: 50px;
    padding: 3px 10px;
}

/* ---- Achievements ---- */

.achieve-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 25px;
}

.achieve-box {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 25px 10px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.achieve-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(245, 197, 24, 0.15);
}

.achieve-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.achieve-value {
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--gold);
}

.achieve-label {
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 4px;
}

/* ---- Gallery ---- */

.gallery {
    margin-bottom: 100px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.gallery-item {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 30px rgba(245, 197, 24, 0.25);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item video {
    width: 100%;
    height: 100%;
    max-height: 360px;
    display: block;
    object-fit: cover;
}

/* ---- Rules ---- */

.rules {
    margin-bottom: 70px;
}

.rules-list {
    max-width: 720px;
    margin: 25px auto 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px 20px;
    transition: transform 0.2s, border-color 0.2s;
}

.rule-item:hover {
    transform: translateX(6px);
    border-color: var(--gold);
}

.rule-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #000;
    background: linear-gradient(135deg, #f5c518, #ff8c00);
}

.rule-text {
    color: var(--text);
}

/* ---- FAQ ---- */

.faq {
    margin-bottom: 70px;
}

.faq-list {
    max-width: 720px;
    margin: 25px auto 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.faq-item:hover {
    border-color: var(--gold);
}

.faq-item summary {
    cursor: pointer;
    padding: 16px 22px;
    font-weight: 700;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::after {
    content: "+";
    font-size: 1.4rem;
    color: var(--gold);
    transition: transform 0.2s;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item p {
    padding: 0 22px 16px;
    color: var(--muted);
}

/* ---- Join / Social ---- */

.join {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 50px 20px;
    border: 1px solid var(--line);
}

.discord-btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    padding: 14px 30px;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 10px;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
}

.invite-box .discord-btn {
    margin: 15px 8px 0;
}

.discord-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(88, 101, 242, 0.4);
}

.social-box {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.social-btn {
    display: inline-block;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--line);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 12px 26px;
    border-radius: 50px;
    text-decoration: none;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.social-btn:hover {
    transform: scale(1.06);
    border-color: var(--gold);
    box-shadow: 0 6px 20px rgba(245, 197, 24, 0.2);
}

.social-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ---- Footer ---- */

footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 30px 20px;
    color: var(--muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--line);
}

.visitor-counter {
    margin-top: 10px;
    color: var(--gold);
    font-weight: 700;
}

.back-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 200;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #f5c518, #ff8c00);
    color: #000;
    font-size: 1.3rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(245, 197, 24, 0.4);
    transition: transform 0.2s;
}

.back-top:hover {
    transform: scale(1.1);
}

.music-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(17, 17, 17, 0.9);
    border: 1px solid rgba(88, 101, 242, 0.5);
    border-radius: 50px;
    padding: 8px 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    max-width: 260px;
}

.music-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #5865f2, #7b68ee);
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s, filter 0.2s;
}

.music-btn:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.music-title {
    color: #fff;
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

@media (max-width: 500px) {
    .music-widget {
        bottom: 76px;
        right: 10px;
        padding: 6px 10px;
        max-width: 210px;
    }
    .music-title {
        max-width: 90px;
    }
}

/* ---- Responsive ---- */

@media (max-width: 800px) {
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .achieve-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .nav-links a {
        display: none;
    }
}

@media (max-width: 600px) {
    .team-name {
        font-size: 3.4rem;
        letter-spacing: 3px;
    }
    .member-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .member-card {
        padding: 18px 8px;
    }
    .avatar-ring {
        width: 80px;
        height: 80px;
    }
    .avatar-inner {
        width: 66px;
        height: 66px;
    }
}

/* ---- Basvuru Formu ---- */

.apply {
    text-align: center;
}

.apply p {
    color: var(--muted);
    margin-bottom: 24px;
}

.apply-form {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.apply-form input,
.apply-form textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.apply-form input:focus,
.apply-form textarea:focus {
    border-color: var(--primary);
}

.apply-form textarea {
    resize: vertical;
    min-height: 110px;
}

.apply-form .hp-field {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.apply-form button {
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.apply-form button:hover {
    background: var(--primary-dark);
}

.apply-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.apply-form #applyStatus {
    min-height: 20px;
    font-size: 0.9rem;
}

#applyStatus.apply-success {
    color: #3ba55c;
}

#applyStatus.apply-error {
    color: #ed4245;
}
