/* Custom CSS - Nano OS Premium Web App Interface */

:root {
    --bg-base: #080b11;
    --bg-panel: rgba(13, 17, 26, 0.7);
    --border-color: rgba(31, 41, 61, 0.6);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --color-cyan: #00ffcc;
    --color-blue: #3b82f6;
    --color-purple: #bd93f9;
    --color-green: #10b981;
    --color-red: #ef4444;
}

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

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    height: 100vh;
    overflow: hidden;
}

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

/* Sidebar Dashboard (Mobile Viewport Ratio on Desktop) */
.dashboard-panel {
    width: 360px;
    background-color: var(--bg-panel);
    border-right: 1px solid var(--border-color);
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);

    z-index: 10;
    overflow-y: auto;
}

.dashboard-header {
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.logo-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--color-cyan);
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.4);
}

.badge {
    background-color: rgba(0, 255, 204, 0.15);
    border: 1px solid var(--color-cyan);
    color: var(--color-cyan);
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.subtitle {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Download Card */
.download-card {
    background: linear-gradient(135deg, rgba(13, 17, 26, 0.9), rgba(15, 23, 42, 0.9));
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.download-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--color-cyan);
}

.download-card p {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Button Styling */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    border-radius: 10px;
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--color-cyan);
    color: var(--bg-base);
}

.btn-primary:hover {
    background-color: #00cca3;
    transform: translateY(-2px);
}

.btn-glowing {
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.3);
}

.btn-glowing:hover {
    box-shadow: 0 0 25px rgba(0, 255, 204, 0.6);
}

.btn-secondary {
    background-color: #1e293b;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: #334155;
    transform: translateY(-2px);
}

.download-icon {
    width: 14px;
    height: 14px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-card {
    background-color: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-title {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    color: var(--color-cyan);
}

/* Main Chat Panel */
.chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 25px;
    position: relative;
    background: radial-gradient(circle at 70% 30%, rgba(189, 147, 249, 0.05), transparent 60%);
}

/* Voice Orb Section */
.orb-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.voice-orb {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid transparent;
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    cursor: pointer;
    outline: none;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pulse Animations for Orb States */
.orb-pulse-cyan {
    background-color: var(--color-cyan);
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.4);
    animation: pulse-cyan 2s infinite alternate;
}

.orb-pulse-blue {
    background-color: var(--color-blue);
    border-color: #60a5fa;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
    animation: pulse-blue 1s infinite alternate;
}

.orb-pulse-purple {
    background-color: var(--color-purple);
    border-color: #c084fc;
    box-shadow: 0 0 15px rgba(189, 147, 249, 0.4);
    animation: pulse-purple 1.2s infinite alternate;
}

.orb-pulse-green {
    background-color: var(--color-green);
    border-color: #34d399;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
    animation: pulse-green 1.4s infinite alternate;
}

@keyframes pulse-cyan {
    0% { transform: scale(1); box-shadow: 0 0 15px rgba(0, 255, 204, 0.4); }
    100% { transform: scale(1.06); box-shadow: 0 0 25px rgba(0, 255, 204, 0.8); }
}
@keyframes pulse-blue {
    0% { transform: scale(1); box-shadow: 0 0 15px rgba(59, 130, 246, 0.4); }
    100% { transform: scale(1.08); box-shadow: 0 0 30px rgba(59, 130, 246, 0.9); }
}
@keyframes pulse-purple {
    0% { transform: scale(1); box-shadow: 0 0 15px rgba(189, 147, 249, 0.4); }
    100% { transform: scale(1.06); box-shadow: 0 0 25px rgba(189, 147, 249, 0.8); }
}
@keyframes pulse-green {
    0% { transform: scale(1); box-shadow: 0 0 15px rgba(16, 185, 129, 0.4); }
    100% { transform: scale(1.05); box-shadow: 0 0 25px rgba(16, 185, 129, 0.7); }
}

.orb-status {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Chat History Display */
.chat-history {
    flex: 1;
    margin: 25px 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-right: 10px;
}

/* Chat Scrollbar Customization */
.chat-history::-webkit-scrollbar {
    width: 6px;
}
.chat-history::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 10px;
}

.chat-bubble {
    max-width: 80%;
    padding: 14px 18px;
    border-radius: 15px;
    font-size: 13px;
    line-height: 1.6;
}

.nano-bubble {
    background-color: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.user-bubble {
    background-color: rgba(0, 255, 204, 0.15);
    border: 1px solid var(--color-cyan);
    color: var(--text-primary);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* Chat Input Bar */
.chat-input-bar {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

.input-container {
    background-color: rgba(13, 17, 26, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 6px 12px 6px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.input-container input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 13px;
}

.input-container input::placeholder {
    color: var(--text-secondary);
}

.btn-mic, .btn-send {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-secondary);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.btn-mic:hover, .btn-send:hover {
    color: var(--color-cyan);
    background-color: rgba(255, 255, 255, 0.05);
}

.btn-mic svg, .btn-send svg {
    width: 18px;
    height: 18px;
}

/* Configurations Modal */
.config-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);

    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.config-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: #0d111a;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.modal-content h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--color-cyan);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    background-color: #080b11;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 12px;
    outline: none;
}

.form-group input:focus {
    border-color: var(--color-cyan);
}

.btn-config-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: var(--bg-panel);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);

    transition: all 0.3s ease;
    z-index: 50;
}

.btn-config-toggle:hover {
    border-color: var(--color-cyan);
    transform: rotate(45deg);
}

/* Responsive Scaling for Mobile Screens */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .dashboard-panel {
        width: 100%;
        height: auto;
        max-height: 250px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .chat-panel {
        height: calc(100vh - 250px);
    }
}

/* ============================================================
   AUTH OVERLAY (Login / Signup)
   ============================================================ */
.auth-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 30% 40%, rgba(0, 255, 204, 0.06) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 60%, rgba(59, 130, 246, 0.08) 0%, transparent 60%),
                var(--bg-base);
    z-index: 200;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: rgba(13, 17, 26, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px 36px;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 0 60px rgba(0, 255, 204, 0.07), 0 20px 60px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

.auth-tagline {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: -12px;
}

.auth-tabs {
    display: flex;
    gap: 8px;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    padding: 4px;
}

.auth-tab {
    flex: 1;
    padding: 8px 0;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}

.auth-tab.active {
    background: rgba(0, 255, 204, 0.12);
    color: var(--color-cyan);
    box-shadow: 0 0 12px rgba(0, 255, 204, 0.15);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-error {
    font-size: 0.85rem;
    color: var(--color-red);
    text-align: center;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.auth-error:not(.hidden) { display: block; }

/* Full-width button variant */
.btn-full {
    width: 100%;
    justify-content: center;
}

/* Modal subtitle text */
.modal-subtitle {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: -10px;
    margin-bottom: 4px;
}

/* Save status message */
.save-status {
    font-size: 0.85rem;
    color: var(--color-green);
    text-align: center;
    margin-top: 8px;
}

/* Utility: hidden */
.hidden {
    display: none !important;
}
