/* Import Poppins Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

/* =========================
   RESET
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =========================
   BASE
========================= */
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* Desktop fixed background */
@media (min-width: 769px) {
    body {
        background-attachment: fixed;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================
   SCROLLBAR
========================= */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.3); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #9333ea, #db2777);
    border-radius: 5px;
}

/* =========================
   NAVBAR
========================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 48px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover { color: #a855f7; }

.nav-btn {
    padding: 10px 24px;
    background: #9333ea;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.nav-btn:hover {
    background: #7e22ce;
    transform: translateY(-2px);
}

/* =========================
   USER DROPDOWN MENU
========================= */

.user-menu {
    position: relative;
    cursor: pointer;
}

.user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.1);
    padding: 8px 14px;
    border-radius: 30px;
    transition: 0.3s;
}

.user-trigger:hover {
    background: rgba(255,255,255,0.2);
}

/* =========================
   NAV PROFILE IMAGE
========================= */

.nav-avatar {
    width: 40px;              /* size */
    height: 40px;             /* same as width */
    border-radius: 50%;       /* makes it perfect circle */
    object-fit: cover;        /* prevents stretching */
    border: 2px solid #9333ea;
    cursor: pointer;
    transition: 0.3s ease;
}

.nav-avatar:hover {
    transform: scale(1.08);
    box-shadow: 0 0 10px rgba(147, 51, 234, 0.6);
}


.user-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    width: 180px;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    padding: 10px 0;
    display: none;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
}

.user-dropdown a {
    display: block;
    padding: 10px 16px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s;
}

.user-dropdown a:hover {
    background: rgba(147, 51, 234, 0.2);
}

.user-menu:hover .user-dropdown {
    display: block;
}




/* =========================
   HERO
========================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    background: radial-gradient(ellipse at center, rgba(147, 51, 234, 0.15) 0%, transparent 70%);
}

.hero-content { max-width: 800px; }

.hero-title {
    font-size: 64px;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff, #e9d5ff, #fbcfe8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

.hero-subtitle { font-size: 32px; font-weight: 600; color: #d8b4fe; margin-bottom: 24px; }
.hero-description { font-size: 20px; color: #d1d5db; margin-bottom: 32px; }

.primary-btn {
    padding: 16px 32px;
    background: linear-gradient(135deg, #9333ea, #db2777);
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.primary-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.5);
}


/* =========================
   AI FLOAT BUTTON
========================= */
#ai-toggle {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9333ea, #db2777);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 10px 25px rgba(147, 51, 234, 0.5);
}

/* =========================
   AI CHAT WINDOW
========================= */
#ai-chat {
    position: fixed;
    bottom: 110px;
    right: 32px;
    width: 380px;
    height: 500px;
    background: rgba(17, 24, 39, 0.95);
    border-radius: 20px;
    display: none;
    flex-direction: column;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    z-index: 999;
}

#ai-chat.active {
    display: flex;
}

/* =========================
   HEADER
========================= */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: linear-gradient(135deg, #9333ea, #db2777);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.chat-header h3 {
    font-size: 16px;
    margin: 0;
}

#chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

/* =========================
   CHAT MESSAGES CONTAINER
========================= */
#chat-box {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    font-size: 14px;

    /* THIS IS THE IMPORTANT FIX */
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* =========================
   MESSAGE BUBBLES
========================= */

.chat-message {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 14px;
    word-wrap: break-word;
}

/* AI message (LEFT) */
.chat-message.ai {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 5px;
}

/* USER message (RIGHT) */
.chat-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #9333ea, #db2777);
    border-bottom-right-radius: 5px;
}

/* Welcome bubble */
.chat-welcome {
    align-self: flex-start;
    background: rgba(147, 51, 234, 0.2);
    padding: 10px 14px;
    border-radius: 12px;
}

/* =========================
   INPUT AREA
========================= */
.chat-input-container {
    display: flex;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

#user-input {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    border: none;
    outline: none;
    background: rgba(255,255,255,0.1);
    color: white;
}

#send-btn {
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #9333ea, #db2777);
    color: white;
    cursor: pointer;
}

/* =========================
   CARDS
========================= */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* =========================
   VALUES SECTION
========================= */

.values-section {
    padding: 100px 24px;
    background: rgba(0, 0, 0, 0.3);
}

.value-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 60px auto 0;
}

.value-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: 0.3s ease;
}

.value-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(147, 51, 234, 0.3);
}

.value-icon {
    font-size: 32px;
    margin-bottom: 15px;
}

/* =========================
   CTA SECTION
========================= */

.cta {
    padding: 120px 24px;
    text-align: center;
    background: linear-gradient(
        135deg,
        rgba(147, 51, 234, 0.15),
        rgba(219, 39, 119, 0.15)
    );
}

.cta h2 {
    font-size: 42px;
    margin-bottom: 20px;
}

.cta p {
    font-size: 18px;
    color: #d1d5db;
    margin-bottom: 30px;
}


.glass-card {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    transition: 0.3s;
}

.glass-card:hover { transform: scale(1.05); }

.card-image { width: 100%; height: 200px; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }

.card-content { padding: 24px; }

/* =========================
   LANGUAGE BUTTONS
========================= */
.language-options {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.language-options button {
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.language-options button:hover {
    background: linear-gradient(135deg, #9333ea, #db2777);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(147, 51, 234, 0.4);
}

.language-options button.active-lang {
    background: linear-gradient(135deg, #9333ea, #db2777);
    border: none;
    box-shadow: 0 8px 20px rgba(147, 51, 234, 0.5);
}

.active-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    background: #9333ea;
    border-radius: 20px;
    font-size: 12px;
}

/* =========================
   AUTH PAGES (FIXED)
========================= */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.auth-container {
    width: 420px;
    padding: 45px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 
        0 15px 50px rgba(0,0,0,0.6),
        inset 0 0 20px rgba(255,255,255,0.05);
    text-align: center;
    animation: fadeIn 0.6s ease;
}

.auth-container h2 {
    margin-bottom: 20px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-container input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: none;
    outline: none;
    background: rgba(255,255,255,0.1);
    color: white;
}

.auth-container button {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #9333ea, #db2777);
    transition: 0.3s;
}

.auth-container button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(147, 51, 234, 0.5);
}

.auth-container a {
    color: #d8b4fe;
    text-decoration: none;
}

.error-msg {
    color: #ff6b6b;
    margin-bottom: 10px;
    font-size: 14px;
}

.modmenu-section {
    padding: 80px 0;
    text-align: center;
}

.section-subtitle {
    color: #aaa;
    margin-bottom: 40px;
}

.mod-card {
    text-align: center;
    padding: 40px 20px;
    transition: 0.3s ease;
}

.mod-card:hover {
    transform: translateY(-10px);
}

.mod-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.secondary-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    text-decoration: none;
    transition: 0.3s;
}

.secondary-btn:hover {
    background: #00bcd4;
}

.deep-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.deep-card {
    background: rgba(255,255,255,0.05);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: 0.3s ease;
}

.deep-card:hover {
    transform: translateY(-8px);
    background: rgba(0,188,212,0.1);
}

.deep-card ul {
    list-style: none;
    padding-left: 0;
}

.deep-card li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.roadmap {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 40px;
}

.roadmap-step {
    width: 220px;
    text-align: center;
    padding: 20px;
}

.roadmap-step span {
    font-size: 30px;
    font-weight: bold;
    color: #00bcd4;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================
   MOBILE FIXES
========================= */
@media (max-width: 768px) {

    .navbar {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: flex-start;
        align-items: center;
    }

    .nav-links {
        display: flex;
        order: 3;
        width: 100%;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 18px;
        padding: 8px 2px 0;
        margin-top: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .nav-links::-webkit-scrollbar { display: none; }
    .nav-links a {
        display: inline-block;
        white-space: nowrap;
        font-size: 15px;
    }
    .nav-btn,
    .user-menu {
        order: 2;
        margin-left: auto;
    }
    .user-trigger span { display: none; }

    .hero-title { font-size: 40px; }
    .hero-subtitle { font-size: 24px; }

    .glass-card:hover,
    .primary-btn:hover {
        transform: none;
        box-shadow: none;
    }

    .auth-container {
        width: 90%;
        padding: 30px;
    }


    


    body { background-attachment: scroll; }



}
