/* --- GLOBAL RESET & VARIABLES --- */
:root {
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --primary-soft: rgba(13, 110, 253, 0.1);
    --dark: #1a1d21;
    --light-bg: #f8f9fa;
    --border-color: #e9ecef;
    --text-main: #2d3748;
    --text-muted: #718096;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--light-bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1 0 auto; }

/* --- REUSABLE COMPONENTS --- */
.card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition);
}

.hover-up:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md) !important;
}

.btn-primary {
    background-color: var(--primary);
    border: none;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.badge-soft-primary {
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 50px;
    font-weight: 600;
}

/* --- NAVBAR & FOOTER --- */
.navbar {
    background-color: var(--dark) !important;
    padding: 1rem 0;
}

.navbar-brand { font-size: 1.4rem; letter-spacing: -0.5px; }

.nav-link { font-weight: 500; opacity: 0.85; }

.nav-link:hover, .nav-link.active { opacity: 1; color: #fff !important; }

.text-danger-hover:hover { color: #ff4d4d !important; }

footer .hover-white:hover { color: #fff !important; }
footer .hover-primary:hover { color: var(--primary) !important; }

/* --- HOME PAGE --- */
.hero-section {
    padding: 120px 0;
    background: radial-gradient(circle at top right, #fff, #f1f4f9);
}

.browser-mockup {
    background: white;
    border: 1px solid var(--border-color);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

/* --- DASHBOARD --- */
.table thead { background-color: #fcfcfd; }
.table th { border-top: none; }

.btn-outline-purple {
    color: #6f42c1;
    border-color: #6f42c1;
}

.btn-outline-purple:hover {
    background-color: #6f42c1;
    color: white;
}

/* --- AI GENERATOR WORKSPACE --- */
.ai-workspace-nav, .ai-workspace-footer { display: none !important; }

.ai-body-fixed { padding-top: 0 !important; margin: 0; overflow: hidden; }

.chat-message { display: flex; flex-direction: column; margin-bottom: 5px; }

.message-content {
    max-width: 85%;
    padding: 14px 18px;
    font-size: 0.92rem;
    line-height: 1.5;
    border-radius: 1.2rem;
    word-wrap: break-word;
}

.chat-message.ai { align-items: flex-start; }
.chat-message.ai .message-content {
    background: white;
    color: var(--text-main);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-color);
}

.chat-message.user { align-items: flex-end; }
.chat-message.user .message-content {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-time { font-size: 0.65rem; color: var(--text-muted); margin-top: 5px; padding: 0 10px; }

.device-btn.active { background: #fff !important; box-shadow: var(--shadow-sm); color: var(--primary); }

.mobile-toggle-btn { border: none; font-weight: 600; font-size: 0.8rem; color: var(--text-muted); transition: var(--transition); }
.active-toggle { background-color: var(--primary) !important; color: white !important; }

/* --- ACCOUNT & SETTINGS --- */
.list-group-item.active { background-color: var(--primary) !important; border-color: var(--primary) !important; font-weight: 600; }

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.border-2 { border-width: 2px !important; }

/* --- UTILITIES --- */
.x-small { font-size: 0.72rem; }
.italic { font-style: italic; }
/* --- AI BUILDER OVERRIDES --- */

/* Hide Navbar and Footer only when ai-body-fixed is on the body */
body.ai-body-fixed .navbar, 
body.ai-body-fixed footer { 
    display: none !important; 
}

/* Force the main container to fill the entire viewport */
body.ai-body-fixed main {
    height: 100vh !important;
    width: 100vw !important;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* Ensure the wrapper inside ai-generator.hbs fills that space */
body.ai-body-fixed .builder-wrapper {
    height: 100%;
    width: 100%;
}

/* --- AUTH PAGES (Login/Register) --- */
.auth-wrapper {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 10% 20%, rgba(216, 241, 230, 0.46) 0.1%, rgba(233, 226, 226, 0.28) 90.1%);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

.auth-brand-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1.5rem auto;
}

.auth-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--dark);
}

.auth-form .form-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.auth-form .form-control {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background-color: #fcfcfd;
}

.auth-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}


/* --- HOMEPAGE SPECIFIC --- */
.hero-gradient {
    background: radial-gradient(circle at 50% -20%, #eef2ff 0%, #f8f9fa 100%);
    padding: 140px 0 100px 0;
    border-bottom: 1px solid var(--border-color);
}

.hero-tagline {
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    padding: 8px 16px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--dark);
}

.feature-grid {
    padding: 80px 0;
    background: #fff;
}

.icon-box {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.showcase-section {
    background-color: #fcfcfd;
    padding: 100px 0;
    border-top: 1px solid var(--border-color);
}

/* Browser Mockup Look for Site Cards */
.site-mockup {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
}

.mockup-header {
    background: #f1f3f5;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid var(--border-color);
}

.dot { width: 8px; height: 8px; border-radius: 50%; background: #dee2e6; }

.mockup-address {
    background: #fff;
    border-radius: 4px;
    padding: 2px 10px;
    font-size: 0.65rem;
    color: var(--text-muted);
    flex-grow: 1;
    text-align: center;
    border: 1px solid var(--border-color);
}

/* --- REGISTER SPECIFIC --- */
.auth-card-wide {
    max-width: 480px; /* Slightly wider to accommodate the side-by-side names */
}

.input-group-text i {
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

.auth-form .row.g-2 .form-label {
    margin-bottom: 0.4rem;
}