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

:root {
    --primary-gradient: linear-gradient(135deg, #9945FF 0%, #FF6B9D 100%);
    --shadow: 0 10px 40px rgba(153, 69, 255, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #f9fafc 100%);
    color: #1a1a2e;
    line-height: 1.6;
}

/* ============ NAVIGATION ============ */
nav {
    background: #fff;
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    flex: 1;
    order: 1;
}

.nav-links {
    display: none;
    gap: 2rem;
    list-style: none;
    width: 100%;
    flex-direction: column;
    order: 3;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: #fff;
}

.nav-links.mobile-active {
    display: block;
    max-height: 500px;
}

.nav-links a {
    text-decoration: none;
    color: #1a1a2e;
    font-weight: 500;
    transition: 0.3s;
    padding: 1rem 2rem;
    border-bottom: 1px solid #f0f0f0;
    display: block;
}

.nav-links a:hover {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-buttons {
    display: flex;
    gap: 0.5rem;
    order: 2;
}

.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #1a1a2e;
    padding: 0.5rem;
    order: 0;
}

/* ============ BUTTONS ============ */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(153, 69, 255, 0.3);
}

.btn-secondary {
    background: 0;
    color: #1a1a2e;
    border: 2px solid var(--primary-gradient);
}

.btn-secondary:hover {
    background: var(--primary-gradient);
    color: #fff;
}

/* ============ HIDE SIGNUP BUTTON ============ */
.auth-buttons a[href*="page=signup"] {
    display: none !important;
}

/* ============ HERO SECTION ============ */
.hero {
    background: linear-gradient(135deg, #f5f7fa 0%, #fff 50%, #f9fafc 100%);
    padding: 100px 2rem;
    text-align: center;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 2rem;
}

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

/* ============ SECTIONS ============ */
.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.feature-card {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* ============ PRICING ============ */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.pricing-card {
    background: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.pricing-card.popular {
    border: 3px solid var(--primary-gradient);
    transform: scale(1.05);
}

.pricing-card:hover {
    box-shadow: var(--shadow);
}

.plan-name {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.plan-features {
    list-style: none;
    margin: 2rem 0;
    text-align: left;
}

.plan-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.plan-features li:before {
    content: "✓ ";
    color: #FF9800;
    font-weight: 700;
    margin-right: 0.5rem;
}

/* ============ FORMS ============ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #1a1a2e;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.9rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: 0;
    border-color: #FF9800;
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.1);
}

/* ============ AUTH PAGES ============ */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, #9945FF 0%, #FF6B9D 50%, #FF9800 100%);
}

.auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-card h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    font-weight: 700;
}

.subtitle {
    text-align: center;
    color: #999;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.link-text {
    text-align: center;
    color: #666;
    font-size: 0.95rem;
    margin-top: 1.5rem;
}

.link-text a {
    color: #FF9800;
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s;
}

.link-text a:hover {
    color: #FF6B9D;
}

/* ============ ALERTS ============ */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

/* ============ STATS ============ */
.stat-card {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: #666;
    margin-top: 0.5rem;
    font-weight: 600;
}

/* ============ FOOTER ============ */
footer {
    background: #0f0f1e;
    color: #fff;
    padding: 3rem 2rem 1rem;
    margin-top: 5rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #FF9800;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #ddd;
    text-decoration: none;
    transition: 0.3s;
}

.footer-section ul li a:hover {
    color: #FF9800;
}

/* ============ TABLES ============ */
table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: var(--primary-gradient);
    color: #fff;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

table td {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

/* ============ DESKTOP (769px+) - SHOW NAV MENU, HIDE TOGGLE ============ */
@media (min-width: 769px) {
    .navbar-container {
        flex-wrap: nowrap;
        gap: 0;
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        font-size: 1.8rem;
        order: initial;
        flex: initial;
    }

    .mobile-menu-toggle {
        display: none;
    }

    .nav-links {
        display: flex;
        width: auto;
        flex-direction: row;
        order: initial;
        max-height: none;
        overflow: visible;
        gap: 2rem;
        background: none;
        padding: 0;
    }

    .nav-links a {
        padding: 0;
        border: none;
        display: inline;
    }

    .auth-buttons {
        order: initial;
        gap: 0.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .pricing-card.popular {
        transform: scale(1);
    }
}

/* ============ MOBILE (max 768px) - HIDE NAV MENU, SHOW TOGGLE ============ */
@media (max-width: 768px) {
    .navbar-container {
        flex-wrap: wrap;
        gap: 0;
        justify-content: flex-start;
        align-items: center;
    }

    .logo {
        font-size: 1.4rem;
        order: 1;
        flex: 1;
        text-align: center;
    }

    .mobile-menu-toggle {
        order: 0;
        display: block;
    }

    .nav-links {
        order: 3;
        width: 100%;
        display: none;
        max-height: 0;
        overflow: hidden;
    }

    .nav-links.mobile-active {
        display: block;
        max-height: 500px;
    }

    .nav-links a {
        padding: 1rem 2rem;
        border-bottom: 1px solid #f0f0f0;
        display: block;
    }

    .auth-buttons {
        order: 2;
        display: flex;
        gap: 0.5rem;
    }

    /* Hide signup button on mobile */
    .auth-buttons a[href*="page=signup"] {
        display: none !important;
    }

    /* Style signin button attractive on mobile */
    .auth-buttons a[href*="page=signin"] {
        background: var(--primary-gradient);
        color: #fff !important;
        border: none !important;
        padding: 0.9rem 1.8rem;
        font-size: 1rem;
        border-radius: 10px;
        box-shadow: 0 5px 20px rgba(153, 69, 255, 0.3);
        font-weight: 700;
        transition: all 0.3s ease;
    }

    .auth-buttons a[href*="page=signin"]:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 30px rgba(153, 69, 255, 0.4);
    }

    .hero {
        padding: 60px 1rem;
        min-height: 400px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .section-title {
        font-size: 1.8rem;
    }

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

    .feature-card {
        padding: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-section {
        text-align: center;
    }

    nav {
        padding: 0.75rem 0;
    }

    #chatbot-container {
        width: 90vw;
        height: 60vh;
        max-width: 350px;
    }

    button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .navbar-container {
        padding: 0 1rem;
    }

    .auth-buttons {
        gap: 0.25rem;
    }

    /* Hide signup button on small mobile */
    .auth-buttons a[href*="page=signup"] {
        display: none !important;
    }

    .nav-links a {
        padding: 0.75rem 2rem;
        font-size: 0.9rem;
    }

    #chatbot-container {
        width: 95vw;
        height: 70vh;
        bottom: 70px;
    }

    table {
        font-size: 0.9rem;
    }

    table th,
    table td {
        padding: 0.75rem 0.5rem;
    }

    .auth-container {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.5rem;
        border-radius: 12px;
    }

    .auth-card h2 {
        font-size: 1.5rem;
    }

    .form-group label {
        font-size: 0.95rem;
    }

    .form-group input,
    .form-group select {
        padding: 0.75rem;
        font-size: 1rem;
    }
}
