/* ============================================================
   PROMPTUNE WEB — PREMIUM DESIGN SYSTEM
   Exact color parity with promptune.in marketing website
   Mobile-first: 375px optimized
   ============================================================ */

:root {
    /* Exact brand tokens from promptune.in */
    --bg:            #0a0e17;
    --bg-alt:        #0f1419;
    --bg-elevated:   #1a2332;
    --bg-card:       rgba(26, 35, 50, 0.95);
    --text:          #f0f4f9;
    --text-dim:      #b8c5d6;
    --text-faint:    #7a8699;
    --brand-blue:    #3b82f6;
    --brand-royal:   #1d4ed8;
    --accent-violet: #a855f7;
    --accent-cyan:   #06b6d4;
    --accent-amber:  #f59e0b;
    --success:       #10b981;
    --error:         #ef4444;
    --border:        rgba(248, 250, 252, 0.08);
    --border-light:  rgba(248, 250, 252, 0.12);
    --radius:        16px;
    --radius-sm:     10px;
    --radius-pill:   50px;
}

/* ═══════════════════ RESET ═══════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
}

a { color: inherit; text-decoration: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; color: inherit; }

/* ═══════════════════ AMBIENT GLOW (identical to website) ═══════════════════ */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.12;
    filter: blur(120px);
}
.glow-1 { width: 400px; height: 400px; background: var(--brand-blue); top: -5%; left: -10%; }
.glow-2 { width: 350px; height: 350px; background: var(--brand-royal); top: 50%; right: -8%; }
.glow-3 { width: 300px; height: 300px; background: var(--accent-violet); bottom: -5%; left: 40%; }

.grid-overlay {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(248, 250, 252, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(248, 250, 252, 0.04) 1px, transparent 1px);
    background-size: 70px 70px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.1;
}

/* ═══════════════════ APP CONTAINER ═══════════════════ */
.app-container {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

@media (min-width: 481px) {
    .app-container {
        margin: 24px 0;
        min-height: calc(100vh - 48px);
        border: 1px solid var(--border-light);
        border-radius: 24px;
        overflow: hidden;
        box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
    }
}

/* ═══════════════════ HEADER ═══════════════════ */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: rgba(10, 14, 23, 0.9);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.logo-icon { font-size: 1.2rem; }

.logo-text {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.logo-badge {
    font-size: 0.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--brand-royal), var(--brand-blue));
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    vertical-align: super;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.uses-counter {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--brand-blue);
    background: rgba(59, 130, 246, 0.1);
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.uses-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ═══════════════════ MAIN ═══════════════════ */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 16px;
    overflow-y: auto;
    background: var(--bg);
}

/* ═══════════════════ SECTION LABELS ═══════════════════ */
.section-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-faint);
    margin-bottom: 10px;
}

/* ═══════════════════ INPUT SECTION ═══════════════════ */
.input-section {
    position: relative;
}

.input-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.input-label-row .section-label {
    margin-bottom: 0;
}

.char-counter {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-faint);
    font-family: 'JetBrains Mono', monospace;
    transition: color 0.2s;
}

.char-counter.warning {
    color: var(--accent-amber);
}

.char-counter.danger {
    color: var(--error);
}

/* Try-it Example Chips */
.try-examples {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.try-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.try-chip {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-dim);
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid var(--border-light);
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.try-chip:hover {
    color: var(--brand-blue);
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

/* Button Shake Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.enhance-btn.shake {
    animation: shake 0.4s ease-in-out;
}

.textarea-wrap {
    position: relative;
}

.main-input {
    width: 100%;
    min-height: 140px;
    background: var(--bg-alt);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.main-input:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.main-input::placeholder {
    color: var(--text-faint);
    font-size: 0.9rem;
}

/* Language Detection Badge */
.lang-detect-badge {
    position: absolute;
    bottom: -12px;
    left: 16px;
    right: 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(5, 150, 105, 0.9));
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 5;
}

.lang-detect-badge.visible {
    opacity: 1;
    transform: translateY(0);
}

.detect-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #fff;
    animation: pulse 1.5s infinite;
}

/* ═══════════════════ TONES SECTION ═══════════════════ */
.tones-section {
    margin-top: 4px;
}

.tones-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tone-hint {
    font-size: 0.68rem;
    color: var(--text-faint);
    font-style: italic;
}

.tones-scroll-container {
    position: relative;
}

.tones-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 8px;
    scrollbar-width: none;
}

.tones-scroll::-webkit-scrollbar { display: none; }

.tones-fade-right {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to right, transparent, var(--bg));
    pointer-events: none;
    z-index: 2;
}

.tone-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-alt);
    border: 1.5px solid var(--border-light);
    color: var(--text-dim);
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}

.tone-btn:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--text);
}

.tone-btn.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.12);
}

.tone-btn .tone-emoji {
    font-size: 1rem;
}

/* ═══════════════════ ENHANCE BUTTON ═══════════════════ */
.action-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.enhance-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--brand-royal), var(--brand-blue));
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(29, 78, 216, 0.3);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.enhance-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.enhance-btn:hover:not(:disabled)::before {
    transform: translateX(100%);
}

.enhance-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.enhance-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

.enhance-btn.loading .btn-icon {
    animation: spin 0.8s linear infinite;
}

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

.shortcut-hint {
    font-size: 0.65rem;
    color: var(--text-faint);
    letter-spacing: 0.05em;
}

/* ═══════════════════ OUTPUT SECTION ═══════════════════ */
.output-section {
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.output-section.hidden { display: none; }

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

.output-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 20px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.output-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--brand-blue), var(--accent-violet), transparent);
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.output-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.output-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-faint);
}

.output-tone-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.output-tone-tag {
    font-size: 0.65rem;
    font-weight: 700;
    background: rgba(59, 130, 246, 0.12);
    color: var(--brand-blue);
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.icon-btn {
    background: rgba(248, 250, 252, 0.06);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn:hover {
    color: var(--brand-blue);
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.output-body {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.8;
    word-wrap: break-word;
    white-space: pre-wrap;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.output-actions-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-faint);
    margin-bottom: 10px;
}

.output-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 14px 8px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.platform-icon {
    font-size: 1.3rem;
}

.platform-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.platform-name {
    font-size: 0.78rem;
    font-weight: 800;
}

.platform-hint {
    font-size: 0.58rem;
    font-weight: 600;
    opacity: 0.7;
}

.chatgpt-btn {
    background: linear-gradient(135deg, rgba(16, 163, 127, 0.15), rgba(16, 163, 127, 0.08));
    border-color: rgba(16, 163, 127, 0.3);
    color: #10a37f;
}

.chatgpt-btn:hover {
    background: rgba(16, 163, 127, 0.2);
    border-color: rgba(16, 163, 127, 0.5);
    box-shadow: 0 4px 16px rgba(16, 163, 127, 0.15);
}

.action-btn.secondary {
    background: rgba(248, 250, 252, 0.04);
    border-color: var(--border-light);
    color: var(--text-dim);
}

.action-btn.secondary:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    background: rgba(59, 130, 246, 0.06);
}

/* ═══════════════════ HISTORY ═══════════════════ */
.history-section.hidden { display: none; }

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.history-item:hover {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.04);
}

.history-prompt {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-result {
    font-size: 0.85rem;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.history-meta {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.history-tone-chip {
    font-size: 0.62rem;
    font-weight: 700;
    background: rgba(59, 130, 246, 0.1);
    color: var(--brand-blue);
    padding: 2px 6px;
    border-radius: var(--radius-pill);
}

/* ═══════════════════ FOOTER ═══════════════════ */
.app-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 20px;
    font-size: 0.72rem;
    color: var(--text-faint);
    border-top: 1px solid var(--border);
    background: var(--bg-alt);
}

.app-footer a {
    color: var(--brand-blue);
    font-weight: 600;
    transition: opacity 0.2s;
}

.app-footer a:hover { opacity: 0.8; }

.footer-sep { opacity: 0.3; }

/* ═══════════════════ LOGIN OVERLAY ═══════════════════ */
.login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 23, 0.88);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: fadeIn 0.3s ease;
    padding: 24px;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.login-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 40px 32px;
    width: 100%;
    max-width: 380px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
}

.login-glow {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: var(--brand-blue);
    border-radius: 50%;
    opacity: 0.1;
    filter: blur(80px);
    pointer-events: none;
}

.login-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    position: relative;
}

.login-card h3 {
    color: var(--text);
    font-size: 1.4rem;
    font-weight: 900;
    margin-bottom: 12px;
}

.login-card p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 28px;
}

.google-btn {
    width: 100%;
    background: #fff;
    color: #3c4043;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s;
    margin-bottom: 12px;
}

.google-btn:hover {
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.dismiss-btn {
    font-size: 0.85rem;
    color: var(--text-faint);
    padding: 8px 16px;
    transition: color 0.2s;
}

.dismiss-btn:hover { color: var(--text); }

/* ═══════════════════ TOAST ═══════════════════ */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--brand-blue);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.35);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 300;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ═══════════════════ SETTINGS GEAR BUTTON ═══════════════════ */
.settings-btn {
    background: rgba(248, 250, 252, 0.06);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 7px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
}

.settings-btn:hover {
    color: var(--brand-blue);
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    transform: rotate(45deg);
}

/* ═══════════════════ CLEAR ALL BUTTON ═══════════════════ */
.tone-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.clear-all-btn {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--error);
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    transition: all 0.2s;
    cursor: pointer;
}

.clear-all-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
}

.clear-all-btn.hidden {
    display: none;
}

/* ═══════════════════ SETTINGS MODAL ═══════════════════ */
.settings-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 23, 0.88);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: fadeIn 0.3s ease;
    padding: 24px;
}

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

.settings-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 32px 28px;
    width: 100%;
    max-width: 420px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
}

.settings-glow {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: var(--accent-violet);
    border-radius: 50%;
    opacity: 0.08;
    filter: blur(80px);
    pointer-events: none;
}

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

.settings-header h3 {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--text);
}

.settings-close-btn {
    background: rgba(248, 250, 252, 0.06);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 10px; /* Increased from 6px for better mobile tap target */
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.settings-close-btn:hover {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.settings-section {
    position: relative;
}

.settings-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text);
    margin-bottom: 8px;
}

.settings-optional {
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-faint);
}

.settings-desc {
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 16px;
}

.settings-desc a {
    color: var(--brand-blue);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.settings-desc strong {
    color: var(--success);
}

.api-key-input-wrap {
    position: relative;
    margin-bottom: 8px;
}

.api-key-input {
    width: 100%;
    background: var(--bg-alt);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 14px 44px 14px 16px;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.api-key-input:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.api-key-input::placeholder {
    color: var(--text-faint);
    font-family: 'JetBrains Mono', monospace;
}

.api-key-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-faint);
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.api-key-toggle:hover {
    color: var(--brand-blue);
}

.api-key-status {
    font-size: 0.72rem;
    font-weight: 600;
    min-height: 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.api-key-status.success { color: var(--success); }
.api-key-status.error { color: var(--error); }
.api-key-status.info { color: var(--brand-blue); }

.api-key-save-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--brand-royal), var(--brand-blue));
    color: #fff;
    padding: 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 800;
    box-shadow: 0 8px 24px rgba(29, 78, 216, 0.3);
    transition: all 0.2s;
    margin-bottom: 8px;
}

.api-key-save-btn:hover {
    box-shadow: 0 12px 32px rgba(29, 78, 216, 0.4);
    transform: translateY(-1px);
}

.api-key-remove-btn {
    width: 100%;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--error);
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 700;
    transition: all 0.2s;
}

.api-key-remove-btn:hover {
    background: rgba(239, 68, 68, 0.15);
}

.api-key-remove-btn.hidden { display: none; }

