:root {
    --bg-color: #050505; /* Deeper black */
    --panel-bg: rgba(10, 10, 10, 0.75);
    --border-color: rgba(197, 160, 89, 0.15); /* Subtle Gold border */
    --border-hover: rgba(197, 160, 89, 0.4); /* Stronger Gold on hover */
    --text-main: #F5F5F5;
    --text-dim: #7A7A7A;
    --accent-gold: #C5A059; /* Deeper, less yellow, true gold */
    --accent-blue: #2A85FF;
    --accent-red: #FF2A6D;
    --glass-blur: blur(24px);
    
    --font-ui: 'Inter', -apple-system, sans-serif;
    --font-mono: 'Fira Code', monospace;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-ui);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Global True Breathing Overlay */
body::after {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #000;
    animation: trueBreathe 5s infinite alternate ease-in-out;
    pointer-events: none;
    z-index: 9999; /* Pulses over everything */
}

@keyframes trueBreathe {
    0% { opacity: 0.0; }
    100% { opacity: 0.6; }
}

/* Ambient Breathing Background */
.ambient-bg {
    position: fixed;
    top: -20%; left: -20%; right: -20%; bottom: -20%;
    width: 140%; height: 140%;
    background: radial-gradient(circle at 50% 50%, rgba(197, 160, 89, 0.12) 0%, transparent 60%);
    animation: deepBreath 5s infinite alternate ease-in-out;
    z-index: -1;
    pointer-events: none;
}

@keyframes deepBreath {
    0% { 
        transform: scale(0.85); 
        opacity: 0.05; /* Almost completely black */
    }
    100% { 
        transform: scale(1.1); 
        opacity: 1; /* Brightens up */
    }
}

.hidden {
    display: none !important;
}

.blink {
    animation: blinker 1s linear infinite;
}
@keyframes blinker {
    50% { opacity: 0; }
}

.dim {
    color: var(--text-dim);
}

.green {
    color: #00FF66;
}
.accent-red {
    color: var(--accent-red);
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* --- Top Navigation --- */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    height: 64px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 28px;
    height: 28px;
    color: var(--text-main);
}

.brand h1 {
    font-family: "Georgia", serif; 
    font-weight: 300;
    font-style: italic;
    font-size: 28px;
    letter-spacing: 4px;
    background: linear-gradient(180deg, #FFFFFF 0%, #A0B2C6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.9), 0 0 25px rgba(160, 178, 198, 0.5);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-selector {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
}
.lang-selector:hover {
    color: var(--text-main);
}
.lang-selector option {
    background: var(--bg-color);
    color: var(--text-main);
}

.btn-wallet {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 6px 14px;
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-wallet:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
}
.wallet-icon {
    color: var(--accent-blue);
    font-weight: bold;
}

.btn-settings {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}
.btn-settings:hover {
    color: var(--text-main);
}

/* --- App Container --- */
.app-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding-top: 64px; /* offset for top nav */
    padding-bottom: 120px; /* offset for bottom input */
}

/* --- Welcome Screen (Centered) --- */
.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    transition: opacity 0.4s ease;
}

.welcome-title {
    font-size: 58px;
    font-family: 'Playfair Display', serif;
    font-weight: 700; /* Thick */
    font-style: italic; /* Elegant */
    text-transform: none;
    margin-bottom: 40px;
    letter-spacing: 0px;
    line-height: 1.1;
    background: linear-gradient(180deg, #FFFFFF 0%, #C5A059 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 40px rgba(0, 0, 0, 1), 0 4px 20px rgba(197, 160, 89, 0.4);
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    max-width: 600px;
}

.action-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(8, 8, 8, 0.9);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 30px;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}
.action-pill:hover {
    background: rgba(197, 160, 89, 0.08);
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(197, 160, 89, 0.15);
}
.action-pill svg {
    color: var(--accent-gold);
}

/* --- Chat Area --- */
.chat-area {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 20px;
    /* hide scrollbar for clean look */
    -ms-overflow-style: none;  
    scrollbar-width: none;  
}
.chat-area::-webkit-scrollbar { 
    display: none; 
}

.messages {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 20px;
}

.message {
    display: flex;
    gap: 16px;
    max-width: 100%;
    animation: fadeIn 0.3s ease;
}

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

.message .avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 14px;
    flex-shrink: 0;
}

.message.user-msg .avatar {
    background: rgba(255, 255, 255, 0.1);
}

.message.system-msg .avatar {
    background: var(--accent-red);
    color: white;
}

.message .content {
    flex: 1;
    line-height: 1.6;
    font-size: 15px;
}

.message .content p {
    margin-bottom: 12px;
}
.message .content p:last-child {
    margin-bottom: 0;
}

/* --- Fixed Input Container --- */
.input-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px 40px;
    background: linear-gradient(to top, var(--bg-color) 80%, transparent);
    z-index: 50;
}

.input-pill {
    width: 100%;
    max-width: 800px;
    display: flex;
    align-items: center;
    background: rgba(5, 5, 5, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 10px 18px;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: all 0.3s ease;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.input-pill:focus-within {
    border-color: var(--accent-gold);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(197, 160, 89, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.attach-icon {
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px;
}
.attach-icon:hover {
    color: var(--text-main);
}

#promptInput {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: var(--font-ui);
    font-size: 16px;
    padding: 10px 14px;
    outline: none;
    resize: none;
    line-height: 24px;
    max-height: 200px;
    caret-color: var(--accent-gold);
}
#promptInput::placeholder {
    color: var(--text-dim);
}

.btn-send {
    background: linear-gradient(135deg, #E6C875 0%, #A67C00 100%);
    color: #000000;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), 0 0 10px rgba(197, 160, 89, 0.3);
}
.btn-send:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8), 0 0 15px rgba(197, 160, 89, 0.5);
}

.input-footer {
    margin-top: 12px;
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--font-ui);
}

/* --- Smoke Terminal (Dark Oracle Logs) --- */
.smoke-terminal {
    width: 100%;
    max-width: 800px;
    background: rgba(5, 5, 5, 0.95);
    border: 1px solid rgba(0, 255, 102, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: #00FF66;
    backdrop-filter: var(--glass-blur);
    box-shadow: 0 0 20px rgba(0, 255, 102, 0.1), inset 0 0 10px rgba(0, 255, 102, 0.05);
    position: relative;
    overflow: hidden;
}

/* Subtle CRT scanline overlay */
.smoke-terminal::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 2;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

.terminal-header {
    border-bottom: 1px dashed rgba(0, 255, 102, 0.4);
    padding-bottom: 8px;
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.terminal-body {
    max-height: 140px;
    overflow-y: auto;
    color: #a0a0a0;
    position: relative;
    z-index: 3;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 255, 102, 0.3) transparent;
}
.terminal-body::-webkit-scrollbar {
    width: 4px;
}
.terminal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 102, 0.3);
    border-radius: 4px;
}

/* Log Line Theatrics */
.log-line {
    margin-bottom: 6px;
    line-height: 1.4;
    animation: typeLog 0.3s ease-out forwards;
    opacity: 0;
    transform: translateY(5px);
}

.log-line.alert {
    color: #FF3366;
    text-shadow: 0 0 5px rgba(255, 51, 102, 0.4);
}

.log-line.highlight {
    color: #C5A059; /* Accent Gold */
    text-shadow: 0 0 5px rgba(197, 160, 89, 0.4);
}

.log-line.defender {
    color: #3399FF;
    text-shadow: 0 0 5px rgba(51, 153, 255, 0.4);
}

@keyframes typeLog {
    0% { opacity: 0; transform: translateY(5px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* --- Modals (Settings & Deposit) --- */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.settings-panel {
    width: 400px;
    padding: 30px;
    border-radius: 16px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.close-modal {
    font-size: 24px;
    color: var(--text-dim);
    cursor: pointer;
}
.close-modal:hover {
    color: var(--text-main);
}

/* Settings List */
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}
.setting-item:last-child {
    border-bottom: none;
}

.setting-info h3 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}
.setting-info p {
    font-size: 12px;
    color: var(--text-dim);
}

/* Toggle Switch (iOS Style) */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}
input:checked + .slider {
    background-color: var(--accent-blue);
}
input:checked + .slider:before {
    transform: translateX(20px);
}
.slider.round {
    border-radius: 24px;
}
.slider.round:before {
    border-radius: 50%;
}

/* Dropdown styling for settings */
.sleek-select {
    width: 100%;
    margin-top: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px;
    border-radius: 8px;
    outline: none;
    font-family: var(--font-ui);
    font-size: 13px;
}
.sleek-select option {
    background: var(--bg-color);
}

/* Deposit Modal specific styles (carried over) */
.network-selector { margin-bottom: 24px; }
.network-options { display: flex; gap: 8px; }
.network-btn {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-dim);
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
}
.network-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-color: var(--border-hover);
}
.deposit-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-bottom: 24px;
}
.qr-placeholder {
    width: 120px;
    height: 120px;
    background: white;
    margin: 0 auto 16px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: black;
}
.address-container {
    display: flex;
    background: rgba(0,0,0,0.5);
    border-radius: 4px;
    padding: 8px 12px;
    align-items: center;
    justify-content: space-between;
}
.wallet-address {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-main);
}
.btn-copy {
    background: var(--text-main);
    color: var(--bg-color);
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
}
.payment-status {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    font-size: 12px;
    color: var(--accent-blue);
}
.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(42, 133, 255, 0.3);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* --- The Void Gate --- */
.void-gate {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #050505;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.void-gate.fade-out {
    opacity: 0;
    pointer-events: none;
}

.void-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.void-brand {
    font-family: "Georgia", serif; 
    font-weight: 300;
    font-style: italic;
    font-size: 32px;
    letter-spacing: 6px;
    background: linear-gradient(180deg, #E0E0E0 0%, #A0B2C6 50%, #C5A059 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.7;
    animation: voidBreathe 4s infinite alternate ease-in-out;
}

@keyframes voidBreathe {
    0% { opacity: 0.3; text-shadow: 0 0 10px rgba(197, 160, 89, 0.1); transform: scale(0.98); }
    100% { opacity: 0.8; text-shadow: 0 0 30px rgba(197, 160, 89, 0.4); transform: scale(1.02); }
}

.void-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(197, 160, 89, 0.2); /* Dim gold */
    color: #E0E0E0;
    font-family: var(--font-mono);
    font-size: 14px;
    padding: 10px 20px;
    text-align: center;
    outline: none;
    width: 300px;
    letter-spacing: 4px;
    transition: all 0.5s ease;
    box-shadow: 0 5px 15px -5px rgba(197, 160, 89, 0.0);
}

.void-input:focus {
    border-bottom: 1px solid rgba(197, 160, 89, 0.8); /* Strong gold */
    box-shadow: 0 10px 20px -5px rgba(197, 160, 89, 0.2);
    color: #fff;
}

.void-input::placeholder {
    color: rgba(255, 255, 255, 0.15);
    letter-spacing: 2px;
}
