:root {
    --primary: #6366f1;
    --secondary: #ec4899;
    --dark: #0f172a;
    --glass: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--dark);
    color: white;
    font-family: 'Plus Jakarta Sans', sans-serif;
    overflow-x: hidden;
}

#app-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Background Blobs */
/* .blob {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.4;
}
.blob-1 { 
    background: var(--primary); 
    top: -100px; 
    left: -100px;
    background-color:
     #0f172a;
 }
.blob-2 {
     background: var(--secondary);
      bottom: -100px;
       right: -100px;
     } */

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 10%;
}
.logo {
     font-size: 
     1.5rem; font-weight: 800; 
    }
.logo span {
     color: 
    var(--primary); 
}

/* Hero Section */
.main-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10%;
}
.hero { 
    text-align: center;
     max-width: 900px;
 }
#typewriter-container {
    font-size: 4rem;
    font-weight: 800;
    color: white;
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    gap: 12px; /* Adds a nice space between 'to' and 'Polio' */
}

.gradient-text {
    background: linear-gradient(135deg, #6366f1, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    /* This makes the colorful text pop against the dark background */
    filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.3));
}
.hero-sub {
     color: #94a3b8;
      font-size: 1.2rem;
       margin-bottom: 40px; }

/* Buttons */
.btn-primary { 
    background: var(--primary);
     border: none; padding: 12px 24px;
      border-radius: 12px; color: white;
       font-weight: 600; cursor: pointer;
     }
.btn-primary-lg { 
    background: var(--primary);
     border: none; padding: 20px 40px;
      border-radius: 15px; color: white;
       font-size: 1.1rem; font-weight: 700;
        cursor: pointer; transition: 0.3s;
     }
.btn-primary-lg:hover { 
    transform: translateY(-5px);
     box-shadow: 0 10px 20px rgba(99, 102, 241, 0.4); 
    }

/* --- Modal Background --- */
/* Modal Overlay Background */
.modal-overlay {
    display: none; /* Controlled by JS */
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* The actual Card */
.modal-card {
    background: #1e293b;
    width: 100%;
    max-width: 450px;
    padding: 40px;
    border-radius: 24px;
    position: relative; /* Needed for the X button position */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* The X Button - Force show on desktop */
.modal-card .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex !important; /* This fixes the desktop visibility */
    align-items: center;
    justify-content: center;
}

/* Input Group Styling */
.input-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-group label {
    font-size: 0.85rem;
    color: #94a3b8;
}

.input-group input {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 12px;
    border-radius: 10px;
    outline: none;
}

.input-group input:focus {
    border-color: #6366f1;
}

.view-toggle-links {
    margin-top: 20px;
    text-align: center;
}

.view-toggle-links a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
}

/* --- The Magic Grid (Desktop) --- */
#state-signup {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Splits the form into two columns */
    gap: 15px;
    text-align: left;
}

/* Make Name and Confirm Password span full width if you want */
#state-signup .input-group:first-child,
#state-signup .input-group:last-child {
    grid-column: span 2;
}

/* --- Inputs --- */
.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 14px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid #334155;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

.input-group input:focus {
    border-color: #6366f1;
}

/* --- Google Button --- */
.btn-google {
    width: 100%;
    padding: 12px;
    background: white;
    color: #1e293b;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-google i {
    color: #4285F4; /* Google Blue icon */
}

/* --- Submit Button --- */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

/* --- Divider --- */
.divider {
    margin: 20px 0;
    display: flex;
    align-items: center;
    color: #475569;
}
.divider::before, .divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #334155;
}
.divider span { padding: 0 10px; font-size: 0.8rem; }
.error-text { 
    color: #ff4757; 
    font-size: 0.8rem;
     display: none;
 }
 /* --- LOGIN BUTTON (In the Nav) --- */
.btn-text {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 10px 20px;
}

.btn-text:hover {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* --- VIEW EXAMPLES BUTTON (Secondary) --- */
.btn-secondary-lg {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 20px 40px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary-lg:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
}

/* --- HERO BUTTONS CONTAINER --- */
.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

/* --- Error States --- */
.input-error {
    border-color: #ff4757 !important;
    background: rgba(255, 71, 87, 0.05) !important;
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.2);
}
/* Create a 2-column layout for the top inputs */
.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 10px;
}

/* On mobile, stack them back up so they aren't too thin */
@media (max-width: 480px) {
    .input-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    font-size: 0.75rem; /* Smaller labels save vertical space */
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    display: block;
    color: var(--text-dim);
}

.modal-card {
    padding: 30px; /* Slightly less padding to tighten things up */
    max-height: 90vh; /* Prevents form from going off-screen */
    overflow-y: auto;
}

.error-text {
    color: #ff4757;
    font-size: 0.75rem;
    margin-top: 5px;
    font-weight: 600;
    display: none; /* Hidden by default */
}

/* --- Auth Switch Styling --- */
.auth-switch {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #94a3b8;
    text-align: center;
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

.auth-switch a:hover {
    text-decoration: underline;
}
.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.close-btn:hover {
    background: rgba(255, 71, 87, 0.1); /* Subtle red tint */
    color: #ff4757; /* Red "exit" color */
    transform: rotate(90deg); /* Modern transition effect */
    border-color: rgba(255, 71, 87, 0.3);
}

.close-btn i {
    font-size: 1.1rem;
}

.small-link {
    display: block;
    font-size: 0.75rem;
    color: var(--primary);
    text-decoration: none;
    margin-top: 8px;
    text-align: right;
}

.small-link:hover {
    text-decoration: underline;
}

/* Fix for Date input appearance in dark mode */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1); /* Makes the calendar icon white */
    cursor: pointer;
}

#signup-only-fields {
    width: 100%;
}
.modal-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* ... your other styles ... */
}

#auth-form {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Ensure signup elements take up full width when visible */
#signup-elements {
    width: 100%;
}

.forgot-link {
    display: block;
    text-align: right;
    font-size: 0.8rem;
    color: #6366f1;
    margin-top: -10px;
    margin-bottom: 20px;
    text-decoration: none;
}

.forgot-link:hover { text-decoration: underline; }

.modal-card {
    background: #1e293b;
    color: white;
    padding: 40px;
    border-radius: 20px;
    width: 400px;
    position: relative;
}

.input-group { margin-bottom: 15px; text-align: left; }
.input-group label { display: block; margin-bottom: 5px; font-size: 0.9rem; color: #94a3b8; }
.input-group input { 
    width: 100%; 
    padding: 12px; 
    background: #0f172a; 
    border: 1px solid #334155; 
    color: white; 
    border-radius: 8px; 
}


:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --primary: #6366f1;
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
}

body {
    background: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    margin: 0;
    overflow-x: hidden;
}

.app-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
    overflow: hidden; /* Prevents double scrollbars */
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto; /* Allows only the content area to scroll */
    background: var(--bg-dark);
}

/* The wrapper that holds your welcome text and cards */
.content-wrapper {
    padding: 30px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- SIDEBAR --- */
.sidebar {
    width: 260px;
    background: var(--bg-card);
    padding: 25px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,0.05);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header { display: flex; justify-content: space-between; align-items: center; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: 10px;
    margin-top: 10px;
}

.nav-item.active, .nav-item:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}


.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 999;
}

/* --- SCROLL ANIMATIONS --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- STAT CARDS --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.stat-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

.close-btn, .menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}
.menu-toggle, .close-btn, .overlay {
    display: none !important;
}
/* --- Styled Search Bar --- */
.search-box {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 400px;
    transition: 0.3s;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.search-box input {
    background: transparent;
    border: none;
    color: white;
    outline: none;
    width: 100%;
}

/* --- Styled Logout Button --- */
.logout-btn {
    margin-top: auto; /* Pushes to bottom of sidebar */
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: 0.3s;
}

.logout-btn:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.02);
}
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

/* Desktop Fix: If Sidebar is always open on desktop, 
ensure the content area doesn't hide behind it */
@media (min-width: 769px) {
    .main-content {
        margin-left: 0; /* Adjust if your sidebar is 'fixed' */
        padding: 40px;
    }
}

.stat-card {
    background: linear-gradient(145deg, #1e293b, #111a2e);
    border: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: 0.4s ease;
}

.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-10px);
}


/* --- Optimized Top Bar for All Screens --- */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: var(--bg-dark);
    gap: 15px; /* Adds space between the items */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Make search bar flexible but smaller on mobile */
.search-box {
    flex: 1; /* Allows search to grow but stay in middle */
    max-width: 400px;
    background: rgba(30, 41, 59, 0.7);
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.search-box input {
    width: 100%;
    background: transparent;
    border: none;
    color: white;
    margin-left: 8px;
    outline: none;
}



/* Profile Avatar Styling */
.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

/* Temporary test: Force cards to be visible */
.reveal {
    opacity: 1 !important;
    transform: none !important;
}

.chat-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px); /* Subtracting top-bar height */
    max-width: 900px;
    margin: 0 auto;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.messages-display {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Message Bubbles */
.message {
    max-width: 80%;
    padding: 12px 18px;
    border-radius: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.ai-message {
    align-self: flex-start;
    background: rgba(30, 41, 59, 0.8);
    color: white;
    border-bottom-left-radius: 2px;
}

.user-message {
    align-self: flex-end;
    background: var(--primary); /* That purple/blue from before */
    color: white;
    border-bottom-right-radius: 2px;
}

/* Input Styling */
.chat-input-area {
    padding: 20px;
    background: rgba(15, 23, 42, 0.8);
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.input-container {
    display: flex;
    align-items: center;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px;
}

#user-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    outline: none;
    resize: none;
    font-family: inherit;
    padding: 5px;
}

#send-btn {
    background: var(--primary);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}
/* Premium AI Chat Styling */
.chat-wrapper {
    display: none; /* Controlled by JS */
    flex-direction: column;
    height: 80vh; 
    margin: 20px;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.chat-header {
    padding: 15px 25px;
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.messages-display {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 12px 18px;
    border-radius: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.ai-message {
    align-self: flex-start;
    background: #1e293b;
    color: white;
    border-bottom-left-radius: 2px;
}

.user-message {
    align-self: flex-end;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    border-bottom-right-radius: 2px;
}

.chat-input-area {
    padding: 20px;
    background: rgba(15, 23, 42, 0.6);
}

.input-container {
    display: flex;
    align-items: center;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 15px;
}

#user-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    outline: none;
    resize: none;
    padding: 10px 0;
}

#send-btn {
    background: #6366f1;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
}
/* Style for the Clear Chat (Trash) Button */
.clear-chat {
    background: rgba(239, 68, 68, 0.1); /* Subtle red tint */
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444; /* Soft red */
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Hover Effect */
.clear-chat:hover {
    background: #ef4444; /* Solid red on hover */
    color: white;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

/* Active/Click Effect */
.clear-chat:active {
    transform: scale(0.95);
}

/* Make sure the icon inside stays centered */
.clear-chat i {
    font-size: 0.9rem;
}

/* project-section styling */
.view-btn {
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    width: 100%;
}

.view-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

/* settings */
.settings-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    padding: 10px;
    border-radius: 8px;
    margin-top: 5px;
    outline: none;
    font-size: 0.9rem;
}

.setting-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #cbd5e1;
}

/* Make checkboxes look a bit more modern */
.setting-toggle input[type="checkbox"] {
    accent-color: #6366f1;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.settings-input:focus {
    border-color: #6366f1;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

/* Optional: Add a success animation to the button */
.view-btn:active {
    transform: scale(0.98);
    background: #4ade80; /* Briefly turns green when clicked */
}

.ai-message p {
    margin: 0 0 10px 0;
}

.ai-message code {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 2px 5px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
}

.ai-message pre {
    background: #1e1e1e;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 10px 0;
}

