/* ============================================ */
/* DISCORD SERVER TEMPLATE - Main Stylesheet    */
/* ============================================ */

/* --- CSS Variables (Discord-inspired) --- */
:root {
    --blurple: #5865F2;
    --blurple-hover: #4752C4;
    --blurple-light: #7983F5;
    --darkest: #1a1b1e;
    --darker: #232428;
    --dark: #2B2D31;
    --mid: #313338;
    --light-mid: #383A40;
    --light: #B5BAC1;
    --lighter: #DBDEE1;
    --white: #FFFFFF;
    --green: #23A55A;
    --yellow: #F0B232;
    --red: #F23F43;
    --gradient-start: #5865F2;
    --gradient-end: #9B59B6;
    --glow-color: rgba(88, 101, 242, 0.4);
    --text-primary: #DBDEE1;
    --text-secondary: #949BA4;
    --border-color: #3F4147;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 30px var(--glow-color);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font);
    background-color: var(--darkest);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- Selection --- */
::selection {
    background: var(--blurple);
    color: var(--white);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--darkest);
}

::-webkit-scrollbar-thumb {
    background: var(--mid);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--light-mid);
}

/* ============================================ */
/* UTILITY CLASSES                              */
/* ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Reveal Animation (Intersection Observer) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================ */
/* BUTTONS                                      */
/* ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--blurple-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn-outline {
    background: transparent;
    color: var(--lighter);
    border: 2px solid var(--light-mid);
}

.btn-outline:hover {
    border-color: var(--blurple);
    color: var(--blurple);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.05rem;
}

/* ============================================ */
/* NAVIGATION                                   */
/* ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(26, 27, 30, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: all var(--transition);
}

.nav.scrolled {
    background: rgba(26, 27, 30, 0.95);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--white);
    transition: opacity var(--transition);
}

.nav-logo i {
    font-size: 1.5rem;
    color: var(--blurple);
}

.nav-logo:hover {
    opacity: 0.85;
}

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

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.3rem 0;
    transition: color var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--blurple);
    border-radius: var(--radius-full);
    transition: width var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-btn {
    display: flex !important;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 2.5px;
    background: var(--white);
    border-radius: var(--radius-full);
    transition: all var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================ */
/* HERO SECTION                                 */
/* ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 120px 2rem 80px;
}

.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-particles .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--blurple);
    border-radius: 50%;
    opacity: 0;
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.2;
    }
    100% {
        opacity: 0;
        transform: translateY(-10vh) scale(1.5);
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    animation: heroGlow 4s ease-in-out infinite;
}

@keyframes heroGlow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.8; }
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(88, 101, 242, 0.15);
    border: 1px solid rgba(88, 101, 242, 0.3);
    color: var(--blurple-light);
    padding: 0.4rem 1.2rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 2rem;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--white);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

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

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

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.hero-stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
}

.hero-stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    z-index: 2;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ============================================ */
/* SECTION HEADERS                              */
/* ============================================ */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 550px;
    margin: 0 auto;
}

/* ============================================ */
/* FEATURES SECTION                             */
/* ============================================ */
.features {
    padding: 6rem 0;
    background: var(--darker);
    position: relative;
}

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

.feature-card {
    background: var(--dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--blurple), var(--gradient-end));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.feature-card:hover {
    border-color: var(--blurple);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    background: rgba(88, 101, 242, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--blurple);
    transition: all var(--transition);
}

.feature-card:hover .feature-icon {
    background: var(--blurple);
    color: var(--white);
    box-shadow: var(--shadow-glow);
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.7rem;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================ */
/* RULES SECTION                                */
/* ============================================ */
.rules {
    padding: 6rem 0;
    background: var(--darkest);
}

.rules-list {
    max-width: 850px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rule-item {
    display: flex;
    gap: 1.5rem;
    background: var(--darker);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem 1.8rem;
    transition: all var(--transition);
}

.rule-item:hover {
    border-color: var(--blurple);
    background: var(--dark);
}

.rule-number {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--blurple);
    opacity: 0.5;
    min-width: 40px;
    line-height: 1;
    padding-top: 2px;
}

.rule-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.3rem;
}

.rule-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================ */
/* TEAM SECTION                                 */
/* ============================================ */
.team {
    padding: 6rem 0;
    background: var(--darker);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.team-card {
    background: var(--dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.team-card:hover {
    border-color: var(--blurple);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.team-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    overflow: hidden;
    border: 3px solid var(--border-color);
    transition: border-color var(--transition);
    background: var(--mid);
}

.team-card:hover .team-avatar {
    border-color: var(--blurple);
}

.team-avatar.owner { border-color: var(--yellow); }
.team-avatar.admin { border-color: var(--blurple); }
.team-avatar.mod { border-color: var(--green); }

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

.team-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-secondary);
}

.team-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.3rem;
}

.team-role {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    margin-bottom: 0.8rem;
}

.owner-role { background: rgba(240, 178, 50, 0.15); color: var(--yellow); }
.admin-role { background: rgba(88, 101, 242, 0.15); color: var(--blurple-light); }
.mod-role { background: rgba(35, 165, 90, 0.15); color: var(--green); }

.team-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
    line-height: 1.6;
}

.team-socials {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.team-socials a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--mid);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all var(--transition);
}

.team-socials a:hover {
    background: var(--blurple);
    color: var(--white);
}

/* ============================================ */
/* JOIN CTA SECTION                             */
/* ============================================ */
.join {
    padding: 6rem 0;
    background: var(--darkest);
}

.join-card {
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.join-content h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1.2rem;
    line-height: 1.2;
}

.join-content p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.join-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Discord Preview Mockup */
.discord-preview {
    background: var(--mid);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.discord-preview-header {
    background: var(--darkest);
    padding: 0.75rem 1rem;
    display: flex;
    gap: 6px;
}

.discord-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.discord-dot.red { background: #ED4245; }
.discord-dot.yellow { background: #FEE75C; }
.discord-dot.green { background: #23A55A; }

.discord-preview-body {
    display: flex;
    height: 220px;
}

.discord-preview-sidebar {
    width: 55px;
    background: var(--darker);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.discord-preview-icon {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--mid);
    transition: all var(--transition);
}

.discord-preview-icon.active {
    background: var(--blurple);
    border-radius: var(--radius);
}

.discord-preview-chat {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.discord-msg {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}

.discord-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--blurple);
    flex-shrink: 0;
}

.discord-msg-avatar.green-bg { background: var(--green); }
.discord-msg-avatar.blue-bg { background: #3B82F6; }

.discord-msg-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--lighter);
    margin-bottom: 2px;
}

.discord-msg-text {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* ============================================ */
/* FOOTER                                       */
/* ============================================ */
.footer {
    background: var(--darker);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-logo i {
    color: var(--blurple);
    font-size: 1.4rem;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    max-width: 320px;
}

.footer-socials {
    display: flex;
    gap: 0.75rem;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: all var(--transition);
}

.footer-socials a:hover {
    background: var(--blurple);
    color: var(--white);
    transform: translateY(-2px);
}

.footer-links-col h4 {
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-links-col ul {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links-col a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color var(--transition);
}

.footer-links-col a:hover {
    color: var(--blurple);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.footer-madeby a {
    color: var(--blurple);
    font-weight: 600;
}

/* ============================================ */
/* RESPONSIVE                                   */
/* ============================================ */
@media (max-width: 1024px) {
    .join-card {
        grid-template-columns: 1fr;
        padding: 3rem 2rem;
    }

    .discord-preview {
        max-width: 450px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .nav-links,
    .nav-btn {
        display: none !important;
    }

    .nav-links.active {
        display: flex !important;
    }

    .hamburger {
        display: flex;
    }

    .hero-stats {
        gap: 2rem;
    }

    .hero-stat-number {
        font-size: 1.5rem;
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

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