/**
 * JakGPT Try Page Styles
 * /var/www/jakgpt.com/assets/css/try.css
 *
 * Build: 2026-03-12 v3 - Voice-reactive ring
 */

/* ==========================================================================
   1. BASE & RESET
   ========================================================================== */

html, body {
    height: 100%;
    overflow: hidden;
    overflow-x: hidden;
    max-width: 100vw;
    position: relative;
}

* {
    max-width: 100%;
    box-sizing: border-box;
}

/* ==========================================================================
   2. NAVIGATION
   ========================================================================== */

.nav {
    padding: 8px 0;
}

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

.nav .btn {
    padding: 8px 16px;
    font-size: 0.85rem;
}

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

.nav-badge {
    padding: 4px 10px;
    font-size: 0.8rem;
}

.nav-badge .avatar {
    width: 18px;
    height: 18px;
    font-size: 0.6rem;
}

.nav-counter {
    padding: 4px 10px;
    font-size: 0.8rem;
}

/* ==========================================================================
   3. LAYOUT & CONTAINER
   ========================================================================== */

.try-page {
    padding: 50px 0 0 0 !important;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    padding: 0 16px 0;
    overflow: hidden;
}

.chat-header {
    display: none;
}

/* ==========================================================================
   4. MESSAGES AREA
   ========================================================================== */

.messages-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 0 8px;
    max-width: 100%;
    scrollbar-gutter: stable;
    min-height: 0;
}

.messages-area::-webkit-scrollbar {
    width: 6px;
}

.messages-area::-webkit-scrollbar-track {
    background: transparent;
}

.messages-area::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 3px;
}

.messages-area::-webkit-scrollbar-thumb:hover {
    background: #4a4a4a;
}

.messages-area {
    scrollbar-width: thin;
    scrollbar-color: #3a3a3a transparent;
}

.message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
    max-width: 100%;
    overflow: hidden;
}

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

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.message-avatar.user {
    background: var(--accent-primary);
    color: white;
}

.message-avatar.assistant {
    background: #2f2f2f;
    color: #ececec;
}

.message-content {
    flex: 1;
    min-width: 0;
    line-height: 1.6;
    color: #ececec;
}

.message-content p {
    margin: 0 0 12px 0;
    color: #ececec;
}

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

/* ==========================================================================
   5. WELCOME CARD
   ========================================================================== */

.no-profile-warning {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: var(--accent-gold);
}

.no-profile-warning a {
    color: var(--accent-gold);
    text-decoration: underline;
}

.welcome-card {
    text-align: center;
    padding: 40px 24px;
    max-width: 500px;
    margin: auto;
}

.welcome-logo {
    width: 64px;
    height: 64px;
    background: var(--gradient-button);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 0 auto 20px;
}

.welcome-card h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: #ececec;
}

.welcome-card p {
    color: #888;
    margin-bottom: 24px;
}

.welcome-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.suggestion-chip {
    background: #252525;
    border: 1px solid #333;
    border-radius: 20px;
    padding: 10px 16px;
    color: #ececec;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.suggestion-chip:hover {
    background: #2f2f2f;
    border-color: var(--accent-primary);
}

/* ==========================================================================
   6. INPUT AREA
   ========================================================================== */

.input-area {
    padding: 12px 0 16px;
    flex-shrink: 0;
}

.input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: #1f1f1f;
    border: 1px solid #333;
    border-radius: 24px;
    padding: 8px 8px 8px 12px;
    position: relative;
}

.input-wrapper:focus-within {
    border-color: var(--accent-primary);
}

.input-wrapper textarea {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ececec;
    font-size: 1rem;
    line-height: 1.5;
    resize: none;
    max-height: 200px;
    padding: 4px 0;
    font-family: inherit;
}

.input-wrapper textarea::placeholder {
    color: #666;
}

.input-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.input-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #ececec;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

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

.input-btn.send-btn {
    background: #ececec;
    color: #1a1a1a;
}

.input-btn.send-btn:hover {
    background: #ffffff;
}

.input-btn.send-btn:disabled {
    background: #424242;
    color: #8e8e8e;
    cursor: not-allowed;
}

.input-btn.recording {
    background: #ef4444;
    color: white;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.input-btn.inverted {
    background: transparent;
    border: 1px solid #444;
}

.input-btn.voice-active {
    background: var(--accent-primary);
    color: white;
    border: none;
}

.voice-btns {
    display: flex;
    gap: 4px;
}

.input-disclaimer {
    text-align: center;
    font-size: 0.7rem;
    color: #666;
    margin-top: 8px;
}

.hidden-input {
    display: none;
}

/* ==========================================================================
   7. PLUS PANEL
   ========================================================================== */

.plus-panel {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 16px;
    padding: 12px;
    display: none;
    flex-direction: column;
    gap: 12px;
    z-index: 50;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}

.plus-panel.show {
    display: flex;
}

.panel-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.panel-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: #252525;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #ececec;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.75rem;
}

.panel-btn:hover {
    background: #2f2f2f;
    border-color: var(--accent-primary);
}

.panel-btn svg {
    width: 22px;
    height: 22px;
}

.settings-row {
    justify-content: center;
    gap: 16px;
}

.panel-setting {
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-label {
    font-size: 0.75rem;
    color: #888;
}

.setting-toggle {
    display: flex;
    background: #252525;
    border-radius: 8px;
    overflow: hidden;
}

.setting-opt {
    padding: 6px 12px;
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.setting-opt:hover {
    color: #ececec;
}

.setting-opt.active {
    background: var(--accent-primary);
    color: white;
}

.search-types-row,
.artifact-types-row {
    justify-content: center;
    padding: 8px;
    background: #252525;
    border-radius: 8px;
}

.search-label {
    font-size: 0.7rem;
    color: #666;
    margin-right: 8px;
}

.search-type-btn,
.artifact-type-btn {
    padding: 4px 12px;
    background: transparent;
    border: none;
    border-radius: 12px;
    color: #888;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.search-type-btn:hover,
.artifact-type-btn:hover {
    color: #ececec;
}

.search-type-btn.active,
.artifact-type-btn.active {
    background: var(--accent-primary);
    color: white;
}

/* ==========================================================================
   8. VOICE RECORDING WAVEFORM
   ========================================================================== */

.voice-waveform {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    background: rgba(20, 20, 20, 0.98);
    border-radius: 24px;
    z-index: 10;
    padding: 0 12px;
}

.voice-waveform.active {
    display: flex;
}

.voice-waveform .stop-btn {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    min-width: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s;
    margin-right: 12px;
    order: 3;
}

.voice-waveform .stop-btn:hover {
    transform: scale(1.1);
}

.voice-waveform .stop-btn svg {
    width: 12px;
    height: 12px;
}

.voice-waveform canvas {
    flex: 1;
    height: 100%;
    order: 2;
}

.voice-waveform .recording-time {
    font-size: 0.85rem;
    color: #ef4444;
    font-variant-numeric: tabular-nums;
    min-width: 48px;
    text-align: left;
    font-weight: 500;
    order: 1;
    margin-right: 12px;
}

.input-wrapper.transcribing .voice-waveform {
    display: flex;
    justify-content: center;
}

.input-wrapper.transcribing .voice-waveform canvas,
.input-wrapper.transcribing .voice-waveform .stop-btn,
.input-wrapper.transcribing .voice-waveform .recording-time {
    display: none;
}

.input-wrapper.transcribing .voice-waveform::after {
    content: 'Transcribing...';
    color: var(--accent-primary);
    font-size: 0.9rem;
}

/* Hide send button by default, show voice buttons */
.input-wrapper .send-btn {
    display: none;
}

/* When text is entered: hide voice buttons, show send button */
.input-wrapper.has-text .voice-btns {
    display: none;
}

.input-wrapper.has-text .send-btn {
    display: flex;
}

/* ==========================================================================
   9. VOICE MODAL
   ========================================================================== */

.voice-demo-modal {
    position: fixed;
    inset: 0;
    background: #1a1a1a;
    z-index: 1000;
    display: none;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

.voice-demo-modal.active {
    display: flex;
}

.voice-demo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #2f2f2f;
    flex-shrink: 0;
}

.voice-demo-header h2 {
    font-size: 1.1rem;
    color: #ececec;
    margin: 0;
}

.voice-demo-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #ececec;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.voice-demo-close:hover {
    background: rgba(255,255,255,0.1);
}

.voice-demo-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow: hidden;
}

.voice-sections-wrapper {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Voice tabs */
.voice-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.voice-tab {
    flex: 1;
    max-width: 140px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    background: #252525;
    color: #888;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.voice-tab:hover {
    background: #2f2f2f;
    color: #ececec;
}

.voice-tab.active {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    color: white;
}

.voice-tab .tab-icon {
    font-size: 1.1rem;
}

/* 3x3 Voice grid */
.voice-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    justify-items: center;
}

.voice-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px 10px;
    border-radius: 14px;
    background: #252525;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.voice-card:hover {
    background: #2f2f2f;
    transform: translateY(-2px);
}

.voice-card.selected {
    border-color: #7c3aed;
    background: rgba(124, 58, 237, 0.15);
}

.voice-card.playing .voice-card-avatar {
    animation: voice-card-pulse 0.5s ease-in-out infinite alternate;
}

@keyframes voice-card-pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

.voice-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    position: relative;
    transition: transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.voice-card-letter {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.voice-card-name {
    color: #ececec;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2px;
}

.voice-card-desc {
    color: #888;
    font-size: 0.7rem;
    text-align: center;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Selected voice preview */
.voice-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #252525 0%, #1f1f1f 100%);
    border-radius: 16px;
    border: 1px solid #333;
}

.voice-preview-avatar {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    max-width: 56px;
    max-height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    flex-grow: 0;
    align-self: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.voice-preview-ring {
    position: absolute;
    width: 72px !important;
    height: 72px !important;
    min-width: 72px !important;
    min-height: 72px !important;
    max-width: 72px !important;
    max-height: 72px !important;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.15);
    pointer-events: none;
    box-sizing: border-box;
}

.voice-preview-ring.speaking {
    border-color: rgba(124, 58, 237, 0.6);
}

.voice-preview-letter {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.voice-preview-info {
    flex: 1;
    min-width: 0;
}

.voice-preview-name {
    color: #ececec;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.voice-preview-desc {
    color: #8e8e8e;
    font-size: 0.85rem;
}

.voice-preview-play {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ececec;
    border: none;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.voice-preview-play:hover {
    transform: scale(1.05);
    background: #ffffff;
}

.voice-preview-play.playing {
    background: #7c3aed;
    color: white;
}

.voice-demo-footer {
    padding: 12px 20px;
    border-top: 1px solid #2f2f2f;
    text-align: center;
    flex-shrink: 0;
}

.voice-demo-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 8px;
}

.voice-demo-btn {
    border: none;
    border-radius: 20px;
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.voice-demo-btn.secondary {
    background: transparent;
    color: #ececec;
    border: 1px solid #424242;
}

.voice-demo-btn.secondary:hover {
    background: rgba(255,255,255,0.1);
}

.voice-demo-btn.primary {
    background: #7c3aed;
    color: white;
}

.voice-demo-btn.primary:hover {
    background: #8b5cf6;
}

.voice-demo-footer p {
    color: #8e8e8e;
    font-size: 0.85rem;
    margin: 0;
}

.voice-demo-footer a {
    color: var(--accent-primary);
    text-decoration: none;
}

/* ==========================================================================
   10. STREAMING & THINKING
   ========================================================================== */

.streaming-cursor {
    animation: blink 0.7s infinite;
    color: var(--accent-primary);
}

.streaming-text {
    white-space: pre-wrap;
    font-family: inherit;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.thinking-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.thinking-dots {
    display: flex;
    gap: 4px;
}

.thinking-dots span {
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: thinking 1.4s infinite;
}

.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes thinking {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   11. EXIT OVERLAY
   ========================================================================== */

.exit-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 15, 0.98);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 100;
    text-align: center;
}

.exit-main h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: #ececec;
}

.exit-subtitle {
    color: #888;
    margin-bottom: 32px;
}

.exit-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 24px;
}

.exit-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    min-width: 180px;
}

.exit-btn-primary {
    background: var(--gradient-button);
    color: white;
}

.exit-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
}

.exit-btn-secondary {
    background: #252525;
    border: 1px solid #333;
    color: #ececec;
}

.exit-btn-secondary:hover {
    background: #2f2f2f;
    border-color: var(--accent-primary);
}

.exit-btn-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
}

.exit-btn-sub {
    font-size: 0.8rem;
    opacity: 0.8;
}

.exit-tagline {
    color: #666;
    font-size: 0.85rem;
}

.exit-divider {
    width: 60px;
    height: 1px;
    background: #333;
    margin: 32px 0;
}

.exit-secondary {
    color: #888;
    font-size: 0.9rem;
}

.exit-secondary p {
    margin: 0 0 8px 0;
    color: #888;
}

.exit-link {
    color: var(--accent-primary);
    text-decoration: none;
}

.exit-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   12. ARTIFACT SIDEBAR
   ========================================================================== */

.artifact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #252525;
    border: 1px solid #333;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin: 12px 0;
}

.artifact-link:hover {
    background: #2f2f2f;
    border-color: var(--accent-primary);
}

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

.artifact-info {
    flex: 1;
}

.artifact-title {
    font-weight: 600;
    color: #ececec;
}

.artifact-desc {
    font-size: 0.85rem;
    color: #888;
}

.artifact-arrow {
    color: #666;
    font-size: 1.2rem;
}

/* ==========================================================================
   13. RESPONSIVE - TABLET (768px)
   ========================================================================== */

@media (max-width: 768px) {
    .chat-container {
        padding: 0 12px;
    }

    .nav .container {
        padding: 0 12px;
    }

    .nav .btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .nav-logo {
        font-size: 1.1rem;
    }

    .voice-demo-content {
        padding: 20px;
    }

    .voice-tab {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .voice-grid {
        gap: 10px;
    }

    .voice-card {
        padding: 14px 8px 12px;
    }

    .voice-card-avatar {
        width: 48px;
        height: 48px;
    }

    .voice-card-letter {
        font-size: 1.3rem;
    }

    .voice-preview {
        padding: 16px 20px;
        gap: 16px;
    }

    .voice-preview-avatar {
        width: 56px;
        height: 56px;
        min-width: 56px;
        min-height: 56px;
        max-width: 56px;
        max-height: 56px;
    }

    .voice-preview-ring {
        width: 68px !important;
        height: 68px !important;
        min-width: 68px !important;
        min-height: 68px !important;
        max-width: 68px !important;
        max-height: 68px !important;
    }

    .voice-preview-letter {
        font-size: 1.4rem;
    }
}

/* ==========================================================================
   14. RESPONSIVE - MOBILE (480px)
   ========================================================================== */

@media (max-width: 480px) {
    .nav {
        padding: 6px 0;
    }

    .nav .container {
        padding: 0 8px;
    }

    .nav-logo {
        font-size: 1rem;
    }

    .nav .btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .nav-badge {
        padding: 3px 8px;
        font-size: 0.7rem;
    }

    .nav-badge .avatar {
        width: 16px;
        height: 16px;
        font-size: 0.5rem;
    }

    .nav-counter {
        padding: 3px 8px;
        font-size: 0.7rem;
    }

    .try-page {
        padding-top: 44px !important;
    }

    .chat-container {
        padding: 0 8px;
    }

    .plus-panel {
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 12px 12px 0 0;
        padding: 8px;
        max-width: 100vw;
    }

    .panel-btn {
        padding: 10px;
        border-radius: 10px;
    }

    .panel-btn span {
        display: none;
    }

    .panel-btn svg {
        width: 20px;
        height: 20px;
    }

    .settings-row {
        gap: 6px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .setting-label {
        display: none;
    }

    .setting-opt {
        padding: 4px 8px;
        font-size: 10px;
    }

    .search-types-row {
        overflow-x: auto;
        justify-content: flex-start;
        padding: 6px 4px;
        gap: 6px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .search-types-row::-webkit-scrollbar {
        display: none;
    }

    .search-label {
        font-size: 8px;
        flex-shrink: 0;
    }

    .search-type-btn {
        padding: 4px 10px;
        font-size: 11px;
        flex-shrink: 0;
    }

    .input-wrapper {
        padding: 6px 6px 6px 10px;
        border-radius: 20px;
        max-width: 100%;
    }

    .try-page,
    .chat-container,
    .messages-area,
    #input-area {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .input-wrapper textarea {
        font-size: 16px;
    }

    .input-btn {
        width: 32px;
        height: 32px;
    }

    .message {
        padding: 10px;
        gap: 10px;
    }

    .message-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .message-content {
        font-size: 0.95rem;
    }

    .welcome-card {
        padding: 20px 16px;
    }

    .welcome-logo {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }

    .welcome-card h2 {
        font-size: 1.3rem;
    }

    .suggestion-chip {
        font-size: 0.8rem;
        padding: 8px 12px;
    }

    .input-disclaimer {
        font-size: 0.55rem;
    }

    /* Voice modal mobile */
    .voice-demo-header {
        padding: 12px 16px;
    }

    .voice-demo-header h2 {
        font-size: 1rem;
    }

    .voice-demo-content {
        padding: 16px;
    }

    .voice-sections-wrapper {
        max-width: 100%;
        gap: 16px;
    }

    .voice-grid {
        gap: 8px;
    }

    .voice-card {
        padding: 12px 6px 10px;
        border-radius: 14px;
    }

    .voice-card-avatar {
        width: 44px;
        height: 44px;
        margin-bottom: 8px;
    }

    .voice-card-letter {
        font-size: 1.2rem;
    }

    .voice-card-name {
        font-size: 0.75rem;
    }

    .voice-card-desc {
        font-size: 0.6rem;
        -webkit-line-clamp: 1;
    }

    .voice-preview {
        flex-direction: column;
        text-align: center;
        padding: 16px;
        gap: 12px;
    }

    .voice-preview-avatar {
        width: 56px;
        height: 56px;
        min-width: 56px;
        min-height: 56px;
        max-width: 56px;
        max-height: 56px;
    }

    .voice-preview-ring {
        width: 68px !important;
        height: 68px !important;
        min-width: 68px !important;
        min-height: 68px !important;
        max-width: 68px !important;
        max-height: 68px !important;
    }

    .voice-preview-info {
        order: 2;
    }

    .voice-preview-play {
        order: 3;
    }

    .voice-demo-footer {
        padding: 12px 16px;
    }

    .voice-demo-actions {
        flex-direction: column;
        gap: 8px;
    }

    .voice-demo-btn {
        width: 100%;
        padding: 12px;
    }

    .voice-demo-footer p {
        font-size: 0.75rem;
    }
}

/* ==========================================================================
   15. RESPONSIVE - SMALL (360px)
   ========================================================================== */

@media (max-width: 360px) {
    .nav .btn-secondary {
        display: none;
    }

    .panel-btn {
        padding: 8px;
    }

    .panel-btn svg {
        width: 18px;
        height: 18px;
    }

    .search-type-btn {
        padding: 3px 8px;
        font-size: 10px;
    }

    .voice-grid {
        gap: 6px;
    }

    .voice-card {
        padding: 10px 4px 8px;
    }

    .voice-card-avatar {
        width: 40px;
        height: 40px;
    }

    .voice-card-letter {
        font-size: 1rem;
    }

    .voice-card-name {
        font-size: 0.7rem;
    }

    .voice-card-desc {
        display: none;
    }

    .voice-sections-wrapper {
        gap: 12px;
    }
}
