@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ============================================
   Text to Speech - Tool Styles
   ============================================ */

/* CSS Variables */
:root {
    --sidebar-width: 300px;
    --primary-color: #2DD4BF;
    --primary-hover: #14B8A6;
    --bg-dark: #0A0A0A;
    --bg-sidebar: #161616;
    --bg-section: #111111;
    --bg-elevated: #1A1A1A;
    --text-primary: #EDEDED;
    --text-secondary: #888888;
    --text-muted: #555555;
    --border-color: #1F1F1F;
    --border-light: #333333;
    --success-color: #10B981;
    --error-color: #EF4444;
    --warning-color: #FBBF24;
    --playback-height: 120px;
}

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    background-color: var(--bg-dark);
    color: var(--text-primary);
}

/* App Container */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ============================================
   Sidebar
   ============================================ */

.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-right: 1px solid var(--border-color);
}

/* Home Button */
.home-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 16px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    transition: all 0.2s;
}

.home-button:hover {
    color: white;
    background: rgba(0, 0, 0, 0.3);
    transform: translateX(-2px);
}

.home-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: contain;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-sidebar);
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
}

.sidebar-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.sidebar-header .subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.sidebar-section {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-section h2 {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* User Account */
.user-account {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.auth-view.hidden { display: none; }

.btn-login {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: #0A0A0A;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-login:hover { background: var(--primary-hover); }

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.user-email {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.credit-balance {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: rgba(45, 212, 191, 0.15);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
}

.user-actions { display: flex; gap: 8px; }

.btn-buy-credits {
    flex: 1;
    padding: 8px 12px;
    background: rgba(72, 187, 120, 0.9);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-buy-credits:hover { background: rgba(72, 187, 120, 1); }

.btn-logout {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
}

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

/* Credit Cost Info */
.credit-cost-info {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 8px;
    background: rgba(72, 187, 120, 0.08);
    border: 1px solid rgba(72, 187, 120, 0.15);
    border-radius: 6px;
}

/* How It Works */
.how-it-works {
    list-style: none;
    padding: 0;
}

.how-it-works li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.4;
}

.how-it-works li:last-child { margin-bottom: 0; }

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    min-width: 22px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
}

/* ============================================
   Right Sidebar (Voice Selection)
   ============================================ */

.sidebar-right {
    width: 320px;
    min-width: 320px;
    background-color: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-color);
    overflow: hidden;
}

.sidebar-right-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.sidebar-right-header h2 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.voice-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 20px;
    flex-shrink: 0;
}

.voice-search {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-section);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.8rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.voice-search:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(252, 76, 2, 0.15);
}

.voice-search::placeholder { color: var(--text-muted); }

.voice-lang-filter {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-section);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.8rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a0aec0' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.voice-lang-filter:focus {
    outline: none;
    border-color: var(--primary-color);
}

.voice-lang-filter option {
    background: var(--bg-sidebar);
    color: var(--text-primary);
}

.voice-gender-filter {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-section);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.8rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a0aec0' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.voice-gender-filter:focus {
    outline: none;
    border-color: var(--primary-color);
}

.voice-gender-filter option {
    background: var(--bg-sidebar);
    color: var(--text-primary);
}

.voice-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 20px 16px;
}

.voice-list::-webkit-scrollbar {
    width: 4px;
}

.voice-list::-webkit-scrollbar-track {
    background: transparent;
}

.voice-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.voice-list::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

.voice-list-loading {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 20px 0;
}

/* Voice Card */
.voice-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

.voice-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-color);
}

.voice-card.selected {
    background: rgba(252, 76, 2, 0.1);
    border-color: var(--primary-color);
}

.voice-card.selected .voice-avatar {
    box-shadow: 0 0 0 2px var(--primary-color);
}

.voice-avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.voice-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.voice-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.voice-lang-tag {
    font-size: 0.65rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.voice-lang-flag {
    font-size: 0.75rem;
}

.voice-preview {
    width: 28px;
    height: 28px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.7rem;
}

.voice-preview:hover {
    background: rgba(252, 76, 2, 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.voice-preview svg {
    width: 12px;
    height: 12px;
}

.voice-preview .preview-stop-icon {
    display: none;
}

.voice-card.previewing .voice-preview {
    background: rgba(252, 76, 2, 0.2);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.voice-card.previewing .voice-preview .preview-play-icon {
    display: none;
}

.voice-card.previewing .voice-preview .preview-stop-icon {
    display: block;
}

/* Featured voice indicator */
.voice-card.selected .voice-name {
    color: var(--primary-color);
}

.voice-tier-badge {
    display: inline-block;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    vertical-align: middle;
    margin-left: 4px;
    letter-spacing: 0.3px;
    line-height: 1.3;
}

.voice-tier-badge.premium {
    background: var(--primary-color);
    color: #fff;
}

.voice-tier-badge.standard {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

/* ============================================
   Playback Settings
   ============================================ */

.setting-group {
    margin-bottom: 16px;
}

.setting-group:last-child {
    margin-bottom: 0;
}

.setting-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 500;
}

.setting-value {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.setting-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: var(--bg-section);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.setting-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--bg-sidebar);
    transition: transform 0.15s;
}

.setting-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.setting-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--bg-sidebar);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* ============================================
   Main Content
   ============================================ */

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Text Input Section */
.text-input-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px 32px;
    padding-bottom: 0;
    min-height: 0;
}

.text-input-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.text-input-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

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

.char-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.credit-preview {
    font-size: 0.7rem;
    color: var(--primary-color);
    font-weight: 600;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.setting-note {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.4;
}

.btn-clear {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-clear:hover {
    background: rgba(252, 129, 129, 0.1);
    border-color: var(--error-color);
    color: var(--error-color);
}

.text-input {
    flex: 1;
    width: 100%;
    min-height: 200px;
    padding: 20px;
    background: var(--bg-section);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.7;
    resize: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.text-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(252, 76, 2, 0.1);
}

.text-input::placeholder {
    color: var(--text-muted);
    line-height: 1.7;
}

/* ============================================
   Reader Display
   ============================================ */

.reader-display {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px 32px;
    padding-bottom: 0;
    min-height: 0;
}

.reader-display.hidden {
    display: none;
}

.reader-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.reader-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-edit {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-edit:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.reader-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: var(--bg-section);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    line-height: 2;
    font-size: 1.05rem;
}

.reader-content::-webkit-scrollbar {
    width: 6px;
}

.reader-content::-webkit-scrollbar-track {
    background: transparent;
}

.reader-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 6px;
}

/* Sentence styling */
.reader-sentence {
    display: inline;
    color: var(--text-muted);
    transition: color 0.2s;
}

.reader-sentence.active {
    color: var(--text-primary);
}

.reader-sentence.spoken {
    color: var(--text-secondary);
}

/* Word highlighting */
.reader-word {
    transition: all 0.1s;
    border-radius: 3px;
    padding: 1px 0;
}

.reader-word.highlighted {
    background: rgba(252, 76, 2, 0.25);
    color: white;
    padding: 1px 2px;
    margin: 0 -2px;
    border-radius: 3px;
    box-shadow: 0 0 8px rgba(252, 76, 2, 0.15);
}

/* ============================================
   Playback Bar
   ============================================ */

.playback-bar {
    flex-shrink: 0;
    padding: 12px 32px 16px;
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border-color);
}

.progress-container {
    margin-bottom: 10px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-section);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.progress-bar:hover {
    height: 6px;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    width: 0%;
}

.progress-time {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.playback-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.playback-divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 8px;
}

.ctrl-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.ctrl-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.ctrl-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.ctrl-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.ctrl-btn-play {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border: none;
    color: white;
}

.ctrl-btn-play:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(252, 76, 2, 0.3);
}

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

.ctrl-btn-play .hidden {
    display: none;
}

/* Download Dropdown */
.download-wrapper {
    position: relative;
}

.download-menu {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    width: 240px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 100;
    overflow: hidden;
    animation: downloadMenuIn 0.15s ease-out;
}

.download-menu.hidden {
    display: none;
}

@keyframes downloadMenuIn {
    from { opacity: 0; transform: translateY(6px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.download-menu-header {
    padding: 10px 14px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.download-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.12s;
    text-align: left;
}

.download-option:hover {
    background: rgba(255, 255, 255, 0.06);
}

.download-option:active {
    background: rgba(252, 76, 2, 0.1);
}

.download-option:last-child {
    border-radius: 0 0 10px 10px;
}

.dl-format {
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 38px;
    color: var(--text-primary);
}

.dl-desc {
    flex: 1;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.dl-badge {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
    white-space: nowrap;
}

.dl-badge.ready {
    background: rgba(72, 187, 120, 0.15);
    color: var(--success-color);
}

.dl-badge.credits {
    background: rgba(252, 76, 2, 0.12);
    color: var(--primary-color);
}

.playback-info {
    text-align: center;
    margin-top: 8px;
}

.current-voice {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ============================================
   Empty State
   ============================================ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 32px;
    text-align: center;
    flex: 1;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* ============================================
   Status Message
   ============================================ */

.status-message {
    padding: 12px 20px;
    font-size: 0.8rem;
    text-align: center;
}

.status-message.hidden { display: none; }

.status-message.success {
    background-color: rgba(72, 187, 120, 0.1);
    color: var(--success-color);
}

.status-message.error {
    background-color: rgba(252, 129, 129, 0.1);
    color: var(--error-color);
}

/* ============================================
   Responsive Design - Tablet
   ============================================ */

@media (max-width: 1024px) {
    .sidebar {
        width: 280px;
        min-width: 280px;
    }

    .sidebar-right {
        width: 280px;
        min-width: 280px;
    }
}

/* ============================================
   Responsive Design - Mobile
   ============================================ */

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .sidebar {
        width: 100%;
        min-width: 100%;
        max-height: none;
        height: auto;
        border-right: none;
        overflow-y: visible;
        flex-shrink: 0;
    }

    .sidebar-right {
        width: 100%;
        min-width: 100%;
        max-height: none;
        height: auto;
        border-left: none;
        border-top: 1px solid var(--border-color);
        overflow-y: visible;
        order: 3;
    }

    .voice-list {
        max-height: 250px;
    }

    .sidebar-header {
        padding: 16px;
        position: relative;
    }

    .sidebar-header h1 {
        font-size: 1.1rem;
    }

    .sidebar-section {
        padding: 12px 16px;
    }

    .main-content {
        min-height: 70vh;
        overflow-y: visible;
    }

    .text-input-section {
        padding: 16px;
    }

    .reader-display {
        padding: 16px;
    }

    .playback-bar {
        padding: 12px 16px 16px;
    }

    .text-input-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .text-meta {
        width: 100%;
        justify-content: space-between;
    }

    .playback-controls {
        gap: 4px;
    }

    .ctrl-btn {
        width: 34px;
        height: 34px;
    }

    .ctrl-btn-play {
        width: 44px;
        height: 44px;
    }

    .playback-divider {
        margin: 0 4px;
    }

    .user-info {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
    }

    .user-email {
        max-width: 120px;
    }
}

/* ============================================
   Responsive Design - Small Phone
   ============================================ */

@media (max-width: 480px) {
    .sidebar-header h1 {
        font-size: 1rem;
    }

    .sidebar-header .subtitle {
        font-size: 0.7rem;
    }

    .user-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-buy-credits,
    .btn-logout {
        width: 100%;
    }

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

    .ctrl-btn-play {
        width: 40px;
        height: 40px;
    }

    .ctrl-btn svg {
        width: 14px;
        height: 14px;
    }

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