:root {
    --bg-body: #121212; /* New variable for landing page background */
    --bg-app: #1e1e1e; /* Updated */
    --bg-panel: #18181b; /* Retained */
    --bg-card: #27272a; /* Retained */
    --primary: #ffffff; /* Retained */
    --primary-hover: #e4e4e7; /* Retained */
    --text-main: #ffffff; /* Updated */
    --text-muted: #aaaaaa; /* Updated */
    --accent: #ffffff; /* New variable */
    --danger: #ff4d4d; /* New variable */
    --border: #333333; /* Updated */
    
    --font-main: 'Outfit', sans-serif; /* Updated */
    --radius-lg: 16px; /* Updated */
    --radius-md: 6px; /* Retained */
    --radius-sm: 8px; /* Updated */
}

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

body {
    background-color: var(--bg-app);
    color: var(--text-main);
    font-family: var(--font-main);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-panel);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 3rem;
    padding-left: 0.5rem;
}

.logo ion-icon {
    font-size: 1.75rem;
    color: var(--text-main);
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-links li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.nav-links li:hover {
    background-color: var(--bg-card);
    color: var(--text-main);
}

.nav-links li.active {
    background-color: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.nav-links li ion-icon {
    font-size: 1.25rem;
}

/* Main Content */
.content-area {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    position: relative;
    background-color: var(--bg-app);
}

.view {
    display: none;
    max-width: 1200px;
    margin: 0 auto;
}

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

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary);
    color: #000;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

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

.btn-icon {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border);
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    transition: transform 0.2s;
}

.btn-icon:hover {
    background: var(--border);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.btn-secondary:hover {
    border-color: var(--text-muted);
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-app);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
}

.stat-card h3 {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Chat Interface */
.chat-container {
    background: var(--bg-app);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    height: calc(100vh - 180px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-history {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    padding: 1rem;
    border-radius: var(--radius-md);
    max-width: 80%;
    line-height: 1.5;
}

.system-message {
    background: var(--bg-card);
    border: 1px solid var(--border);
    align-self: flex-start;
    color: var(--text-muted);
}

.user-message {
    background: var(--primary);
    color: #000;
    align-self: flex-end;
}

.ai-message {
    background: var(--bg-card);
    border: 1px solid var(--border);
    align-self: flex-start;
}

.chat-input-area {
    padding: 1rem;
    background: var(--bg-panel);
    border-top: 1px solid var(--border);
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

textarea {
    flex: 1;
    background: var(--bg-app);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    color: white;
    font-family: inherit;
    resize: none;
    height: 48px;
    min-height: 48px;
    max-height: 120px;
    transition: border 0.2s;
}

textarea:focus {
    outline: none;
    border-color: var(--text-muted);
}

/* Manual Form */
.manual-form-container {
    max-width: 600px;
    background: var(--bg-app);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

input[type="text"], input[type="number"], input[type="url"], textarea {
    width: 100%;
    background: var(--bg-app);
    border: 1px solid var(--border);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    color: white;
    font-family: inherit;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--text-muted);
}

.item-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}
#landing-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-body);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.landing-content {
    text-align: center;
}

.landing-content h1 {
    font-size: 3rem;
    margin: 0 0 1rem 0;
    color: var(--text-main);
}

.landing-content p {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-app);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.google-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: white;
    color: #3c4043;
    border: 1px solid #dadce0;
    padding: 12px 24px;
    border-radius: 4px;
    font-family: 'Google Sans', 'Roboto', arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.google-btn:hover {
    background: #f8f9fa;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Floating Chat Button */
.floating-chat-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: #000;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 1000;
}

.floating-chat-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.floating-chat-btn svg {
    width: 24px;
    height: 24px;
}
