:root {
    --bg-dark: #131314;
    --sidebar-bg: #1e1f20;
    --input-bg: #282a2d;
    --text-primary: #e3e3e3;
    --text-secondary: #b4b4b4;
    --accent-blue: #4285f4;
    --accent-purple: #a142f4;
    --danger: #ea4335;
    --border-color: #444746;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
}

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

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

.new-chat-btn {
    padding: 12px 16px;
    background-color: #333537;
    border-radius: 24px;
    font-size: 0.9rem;
    margin-bottom: 24px;
    cursor: pointer;
    transition: background 0.2s;
}

.new-chat-btn:hover {
    background-color: #3f4144;
}

.history {
    flex: 1;
}

.history-item {
    padding: 10px 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 8px;
    cursor: pointer;
}

.history-item:hover {
    background-color: #333537;
}

.login-section {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.login-prompt-btn {
    width: 100%;
    padding: 10px;
    background-color: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.login-prompt-btn:hover {
    background-color: #5191f5;
}

/* Main Chat Area */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.chat-header {
    padding: 16px 24px;
    display: flex;
    align-items: center;
}

.chat-header h1 {
    font-size: 1.2rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge {
    font-size: 0.7rem;
    background: linear-gradient(90deg, #4285f4, #a142f4);
    padding: 2px 8px;
    border-radius: 12px;
    color: white;
}

.chat-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.welcome-screen {
    text-align: center;
    max-width: 600px;
}

.logo-main {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 24px;
    animation: glow 3s infinite ease-in-out;
    border-radius: 20%;
}

@keyframes glow {
    0%, 100% { filter: drop-shadow(0 0 5px rgba(66, 133, 244, 0.4)); opacity: 0.9; }
    50% { filter: drop-shadow(0 0 20px rgba(161, 66, 244, 0.6)); opacity: 1; }
}

.welcome-screen h2 {
    font-size: 2rem;
    margin-bottom: 12px;
    background: linear-gradient(90deg, #4285f4, #d96570);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-screen p {
    color: var(--text-secondary);
}

/* Input Area */
.input-area {
    padding: 0 24px 24px;
    width: 100%;
}

.input-wrapper {
    background-color: var(--input-bg);
    border-radius: 32px;
    padding: 8px 16px 8px 24px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    border: 1px solid transparent;
    transition: border 0.3s;
}

.input-wrapper:focus-within {
    border-color: #555;
}

#userInput {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    padding: 12px 0;
}

.send-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.send-btn:hover {
    background: #3c4043;
    color: var(--text-primary);
}

.disclaimer {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 12px;
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.modal-content {
    background-color: #282a2d;
    width: 90%;
    max-width: 600px;
    border-radius: 24px;
    padding: 40px;
    position: relative;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border-color);
}

.modal-overlay.active {
    display: flex;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.warning-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(234, 67, 53, 0.1);
    color: var(--danger);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto 16px;
    border: 2px solid var(--danger);
}

.modal-header h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
}

.modal-body p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.5;
}

.plans-container {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
}

.plan-card {
    flex: 1;
    background-color: #333537;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s;
    position: relative;
}

.plan-card:hover {
    transform: translateY(-5px);
}

.plan-card.featured {
    border-color: var(--accent-blue);
    background-color: #2d3644;
}

.featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-blue);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.plan-card h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.price span {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.savings {
    color: #81c995;
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.plan-btn {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.plan-btn.primary {
    background: var(--accent-blue);
    border: none;
}

.plan-btn:hover {
    background: rgba(255,255,255,0.1);
}

.plan-btn.primary:hover {
    background: #5191f5;
}

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

.secondary-btn {
    background: transparent;
    border: none;
    color: var(--accent-blue);
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
}

/* Thinking Indicator */
.thinking-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 900;
    color: white;
    gap: 16px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .sidebar { display: none; }
    .plans-container { flex-direction: column; }
    .modal-content { padding: 24px; }
}
