/* =========================================
   Color & Styling Variables
========================================= */
:root {
    --bg-dark: #0f172a;
    --bg-glow: radial-gradient(circle at 50% 50%, #2e1065 0%, #0f172a 100%);
    --accent: #ff6f43; /* AutoNete Orange */
    --accent-hover: #ff8560;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover-border: rgba(255, 255, 255, 0.18);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --error-color: #ef4444;
    --success-color: #10b981;
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* =========================================
   Base Styles
========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-dark);
    font-family: 'Montserrat', sans-serif;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

.ambient-glow {
    position: fixed;
    top: -20%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255, 111, 67, 0.15) 0%, rgba(46, 16, 101, 0.3) 50%, rgba(0,0,0,0) 100%);
    filter: blur(80px);
    pointer-events: none;
    z-index: -1;
}

.glass-card, .glass-header, .glass-footer, .mobile-drawer {
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    transition: var(--transition);
}

/* =========================================
   Header & Navigation
========================================= */
.glass-header {
    position: fixed;
    top: 20px;
    left: 5%;
    right: 5%;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    z-index: 1000;
    border-radius: 50px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-svg {
    width: 38px;
    height: 38px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.desktop-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.desktop-nav a:hover, .desktop-nav a.nav-highlight {
    color: var(--text-primary);
}

.cta-btn {
    background: var(--accent);
    color: white !important;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
}

.cta-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 20px rgba(255, 111, 67, 0.4);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

.mobile-drawer {
    position: fixed;
    top: 100px;
    left: 5%;
    right: 5%;
    padding: 20px;
    display: none;
    flex-direction: column;
    z-index: 999;
    border-radius: 24px;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.mobile-nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
}

/* =========================================
   Buttons & Globals
========================================= */
.primary-btn, .secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
}

.primary-btn {
    background: var(--accent);
    color: white;
}

.primary-btn:hover:not(:disabled) {
    background: var(--accent-hover);
    box-shadow: 0 8px 24px rgba(255, 111, 67, 0.35);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--glass-hover-border);
}

.small-btn {
    padding: 10px 18px;
    font-size: 0.85rem;
}

.full-width {
    width: 100%;
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* =========================================
   Hero Section
========================================= */
.hero-section {
    padding: 140px 5% 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-content {
    max-width: 900px;
    padding: 60px 40px;
    text-align: center;
}

.badge {
    display: inline-block;
    background: rgba(255, 111, 67, 0.15);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h1 {
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 35px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.services-section, .auditor-section, .pricing-section {
    padding: 80px 5%;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.section-title p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* =========================================
   Services / Features Grid
========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--glass-hover-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.card-icon {
    background: rgba(255, 111, 67, 0.1);
    border: 1px solid var(--accent);
    color: var(--accent);
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
}

.card-icon .material-icons {
    font-size: 1.8rem;
}

.service-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.accent-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
}

/* =========================================
   Auditor Section (Tabs & Forms)
========================================= */
.auditor-container {
    max-width: 850px;
    margin: 0 auto;
    padding: 40px;
}

.auditor-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 35px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 15px;
    flex-wrap: wrap;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 10px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    border-radius: 8px;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: var(--text-primary);
    background: rgba(255, 111, 67, 0.15);
    border: 1px solid rgba(255, 111, 67, 0.3);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.tab-header { margin-bottom: 25px; }
.tab-header h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.tab-header p { color: var(--text-secondary); font-size: 0.9rem; }

.auditor-form, .auth-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.auditor-form input[type="text"], 
.auditor-form textarea, 
.auditor-form select,
.auth-form input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.file-input {
    padding: 12px !important;
    font-size: 0.9rem !important;
    cursor: pointer;
}

.auditor-form input:focus, .auditor-form textarea:focus, .auditor-form select:focus, .auth-form input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 10px rgba(255, 111, 67, 0.2);
    background: rgba(0, 0, 0, 0.5);
}

.auditor-form select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
    cursor: pointer;
}

#video-voice-select {
    appearance: menulist;
    -webkit-appearance: menulist;
    background-image: none;
}

.auditor-form select option {
    background: var(--bg-dark);
    color: var(--text-primary);
    padding: 10px;
}

/* AI Generation Shimmer & UI */
.audit-results { margin-top: 35px; padding-top: 30px; border-top: 1px solid var(--glass-border); }

.ai-loading-shimmer {
    background: linear-gradient(90deg, rgba(255,111,67,0.1) 25%, rgba(255,111,67,0.4) 50%, rgba(255,111,67,0.1) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    padding: 15px 20px;
    border-radius: 8px;
    color: #e2e8f0;
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 10px;
}

@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.model-badge {
    display: inline-block;
    background: #475569;
    color: white;
    font-size: 0.75rem;
    font-family: monospace;
    padding: 3px 8px;
    border-radius: 4px;
}

.preview-box {
    margin-top: 15px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: #ffffff;
}
.site-preview { width: 100%; height: 400px; border: none; display: block; }

.code-block {
    background: #0f172a;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    overflow-x: auto;
    color: #e2e8f0;
    font-family: monospace;
    font-size: 0.9rem;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* =========================================
   SaaS Pricing Section 
========================================= */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.pricing-card {
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.pricing-card.popular {
    border: 1px solid rgba(255, 111, 67, 0.5);
    background: rgba(255, 111, 67, 0.03);
    transform: scale(1.02);
}

.popular-badge {
    position: absolute;
    top: 15px;
    right: -30px;
    background: var(--accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 40px;
    transform: rotate(45deg);
    text-transform: uppercase;
}

.plan-header { margin-bottom: 25px; text-align: center; }
.plan-header h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 10px; }
.plan-header p { color: var(--text-secondary); font-size: 0.95rem; }
.plan-header .price { font-size: 3rem; font-weight: 900; margin: 15px 0; color: var(--text-primary); }
.plan-header .price span { font-size: 1.2rem; vertical-align: super; font-weight: 600; margin-right: 4px; }
.plan-header .price .interval { font-size: 1rem; font-weight: 500; color: var(--text-secondary); vertical-align: baseline; }

.plan-features {
    list-style: none;
    margin-bottom: 30px;
    flex-grow: 1;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.plan-features li .material-icons {
    color: var(--success-color);
    font-size: 1.2rem;
}

.plan-features li.disabled { color: var(--text-secondary); }
.plan-features li.disabled .material-icons { color: var(--error-color); }

/* =========================================
   Auth & Profile Modals (Sign Up / Login / Reset)
========================================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.modal-overlay.active { opacity: 1; }

.modal {
    width: 100%;
    max-width: 480px;
    padding: 50px 40px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: 90vh; 
    overflow-y: auto;
}

.modal-overlay.active .modal { transform: translateY(0); }

.close-modal-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
}

.close-modal-btn:hover { color: var(--text-primary); }

.auth-header { text-align: center; margin-bottom: 35px; }
.auth-header h3 { font-size: 1.8rem; font-weight: 800; margin-bottom: 8px; }
.auth-header p { color: var(--text-secondary); font-size: 0.95rem; }

.auth-footer { text-align: center; margin-top: 20px; font-size: 0.9rem; }

/* =========================================
   Footer & Toast Notifications
========================================= */
.glass-footer { margin: 60px 5% 30px; padding: 30px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-bottom p { color: var(--text-secondary); font-size: 0.9rem; }

.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { padding: 16px 24px; border-radius: 12px; color: white; font-family: inherit; font-weight: 600; font-size: 0.95rem; opacity: 0; transform: translateY(20px); transition: opacity 0.3s ease, transform 0.3s ease; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: var(--success-color); }
.toast.error { background: var(--error-color); }

/* =========================================
   Responsive Breakpoints
========================================= */
@media (max-width: 900px) {
    .pricing-card.popular { transform: scale(1); }
    .desktop-nav { display: none; }
    .mobile-menu-toggle { display: block; }
}

@media (max-width: 600px) {
    h1 { font-size: 2.2rem; }
    .section-title h2 { font-size: 1.8rem; }
    .form-row { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .hero-actions { flex-direction: column; }
    .modal { padding: 40px 24px; margin: 15px; }
}

/* =========================================
   NEW CLASSES (Separated from HTML)
========================================= */

/* Usage Tracker in Section Title */
.usage-tracker {
    display: inline-block;
    padding: 10px 20px;
    margin-top: 15px;
}

.usage-label {
    font-weight: 600;
    color: var(--accent);
}

/* General Generator JS Toggled containers */
.audit-results,
.output-container,
.ai-loading-shimmer {
    display: none;
}

/* Loading Icon Spacing */
.ai-loading-shimmer .spin-icon {
    vertical-align: middle;
    margin-right: 8px;
}

/* Output Container Spacing */
.output-container {
    margin-top: 20px;
}

/* Code View Tabs Container */
.code-tabs {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

/* Specific Code Tab Buttons */
.code-tab-btn {
    padding: 6px 16px;
    min-width: auto;
}

/* Non-active Code Tab Buttons */
.code-tab-btn:not(.active) {
    background: transparent;
}

/* Code View Panel */
.code-view {
    display: none;
}

.code-view.active {
    display: block;
}

/* Code Header (Badge + Actions) */
.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 12px;
}

/* Action button group in header */
.code-header-actions {
    display: flex;
    gap: 8px;
}

/* Small Buttons with Icons and Text */
.icon-text-btn-small {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
}

/* Specific Small Icons */
.small-icon {
    font-size: 16px;
}

/* Email/Assistant Preview Spacing */
.site-preview + .code-header {
    margin-top: 20px;
}

/* Assistant Boilerplate form container */
.boilerplate-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

/* Generic Form Input Styling */
.form-input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: inherit;
    font-family: inherit;
}

/* Highlighted Task Input (Step 8) */
.ast-task-input {
    background: rgba(255, 255, 255, 0.08);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    margin-top: 10px;
}

/* Variant Selection Bar */
.variant-selection {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.04);
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.selection-label {
    font-size: 14px;
    font-weight: 500;
}

.variant-btns {
    display: flex;
    gap: 8px;
}

/* Specific Variant Buttons */
.output-variant-btn {
    padding: 6px 14px;
    font-size: 13px;
    min-width: auto;
}

/* Non-active Variant Buttons */
.output-variant-btn:not(.active) {
    background: transparent;
}

/* Text Output specific header */
.preview-header-with-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

/* Text Output Card styling */
.text-output-card {
    padding: 20px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
}

#assistant-text-content {
    white-space: pre-wrap;
    line-height: 1.6;
    font-size: 15px;
}