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

:root {
    --gold: #B8860B;
    --gold-light: #DAA520;
    --gold-dark: #856404;
    --brown: #5D4E37;
    --cream: #F5F5DC;
    --beige: #F0EAD6;
    --white: #FFFFFF;
    --text-dark: #3E2723;
    --border: #D4AF37;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--beige);
    overflow: hidden;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.hidden {
    display: none;
}

/* Auth Modal */
.auth-modal {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    width: 400px;
    max-width: 90%;
}

.modal-tabs {
    display: flex;
    border-bottom: 2px solid var(--beige);
}

.tab {
    flex: 1;
    padding: 1rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    transition: all 0.2s;
}

.tab.active {
    background: var(--gold-light);
    color: var(--white);
}

.tab:hover:not(.active) {
    background: var(--beige);
}

/* Auth Forms */
.auth-form {
    display: none;
    padding: 2rem;
}

.auth-form.active {
    display: block;
}

.auth-form h3 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.auth-form input {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--gold);
}

.username-hint {
    display: block;
    margin: -0.5rem 0 1rem 0;
    color: var(--brown);
    font-size: 0.875rem;
}

#emailPreview {
    font-weight: 600;
    color: var(--gold-dark);
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin: -0.5rem 0 1rem 0;
    display: none;
}

.error-message.active {
    display: block;
}

.btn-submit {
    width: 100%;
    padding: 0.875rem;
    background: var(--gold);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit:hover {
    background: var(--gold-dark);
}

/* App Container */
.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--cream);
    border-right: 2px solid var(--border);
    padding: 1.5rem;
    overflow-y: auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-dark);
}

.logo-icon {
    color: var(--gold);
    font-size: 2rem;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section h4 {
    color: var(--brown);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.quick-btn {
    width: 100%;
    padding: 0.875rem;
    margin-bottom: 0.5rem;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    color: var(--text-dark);
}

.quick-btn:hover:not(:disabled) {
    background: var(--beige);
    transform: translateX(4px);
}

.quick-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.quick-btn .icon {
    font-size: 1.5rem;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background: var(--gold-light);
    border-radius: 8px;
    color: var(--white);
}

.benefit-icon {
    font-size: 1.5rem;
}

.benefit strong {
    display: block;
    font-size: 0.95rem;
}

.benefit small {
    display: block;
    font-size: 0.8rem;
    opacity: 0.9;
}

.btn-plans {
    width: 100%;
    padding: 1rem;
    background: var(--gold);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-plans:hover:not(:disabled) {
    background: var(--gold-dark);
}

.btn-plans:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--beige);
}

.top-header {
    padding: 1.5rem 2rem;
    background: var(--white);
    border-bottom: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    font-size: 1.125rem;
    color: var(--text-dark);
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.btn-secondary, .btn-primary {
    padding: 0.625rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-dark);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--beige);
}

.btn-primary {
    background: var(--gold);
    color: var(--white);
    border: none;
}

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

.btn-secondary:disabled, .btn-primary:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Welcome Section */
.welcome-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.scale-icon {
    font-size: 6rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.welcome-section h1 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--brown);
}

/* Chat Input */
.chat-input-container {
    padding: 2rem;
    display: flex;
    gap: 1rem;
    background: var(--white);
    border-top: 2px solid var(--border);
}

.chat-input-container input {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
}

.chat-input-container input:focus {
    outline: none;
    border-color: var(--gold);
}

.chat-input-container button {
    width: 50px;
    height: 50px;
    background: var(--gold);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-input-container button:hover:not(:disabled) {
    background: var(--gold-dark);
}

.chat-input-container button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.input-hint {
    text-align: center;
    padding: 0.5rem;
    color: var(--brown);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .welcome-section h1 {
        font-size: 2rem;
    }
    
    .auth-modal {
        width: 350px;
    }
}
