/* Tool-specific styles only - base styles are in tool-layout.css */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #0a0a0a;
    color: #e5e7eb;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #141414;
    border-bottom: 1px solid #374151;
    z-index: 100;
}

    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

    margin-top: 60px;
    padding: 48px 24px;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    max-width: 720px;
    margin: 0 auto;
}

.browser-warning {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 24px;
    text-align: center;
}

.warning-content h2 {
    font-size: 24px;
    font-weight: 600;
    color: #ef4444;
    margin-bottom: 12px;
}

.warning-content p {
    font-size: 16px;
    color: #9ca3af;
}

.tool-main {
    flex: 1;
    padding: 32px 24px 120px;
}

.tool-container {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group > label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.text-area {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 16px;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    line-height: 1.6;
    outline: none;
    resize: vertical;
    min-height: 240px;
    transition: border-color 150ms ease;
}

.text-area:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.text-area::placeholder {
    color: #6b7280;
}

.text-area.ssml-mode {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.char-counter {
    font-size: 13px;
    color: #6b7280;
    text-align: right;
}

.char-counter.warning {
    color: #f59e0b;
}

.char-counter.error {
    color: #ef4444;
}

.no-voices-warning {
    background-color: #7f1d1d;
    border: 1px solid #dc2626;
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
}

.settings-title {
    font-size: 18px;
    font-weight: 500;
    color: #d1d5db;
    margin-bottom: 4px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.setting-item > label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.setting-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.select-input {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    transition: border-color 150ms ease;
}

.select-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.select-input option {
    background-color: #1a1a1a;
}

.select-input optgroup {
    color: #9ca3af;
    font-weight: 600;
}

input[type="range"].slider {
    width: 100%;
    height: 4px;
    background-color: #374151;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
    display: block;
}

input[type="range"].slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background-color: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    transition: box-shadow 150ms ease;
}

input[type="range"].slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background-color: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

input[type="range"].slider:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.modal-hidden {
    display: none;
}

.output-section {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.playback-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.button-group {
    display: flex;
    gap: 8px;
}

.button-playback {
    background-color: #1a1a1a;
    color: #e5e7eb;
    border: 1px solid #374151;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    flex: 1;
    text-align: center;
}

.button-playback:hover:not(:disabled) {
    background-color: #374151;
}

.button-playback:disabled {
    color: #6b7280;
    cursor: not-allowed;
    opacity: 0.5;
}

.button-playback.active {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.progress-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background-color: #374151;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #3b82f6;
    border-radius: 2px;
    width: 0%;
    transition: width 200ms ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #9ca3af;
}

.text-preview-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.text-preview {
    background-color: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 16px;
    font-size: 15px;
    line-height: 1.8;
    color: #e5e7eb;
    max-height: 300px;
    overflow-y: auto;
    word-wrap: break-word;
}

.text-preview .word {
    display: inline;
    padding: 1px 2px;
    border-radius: 3px;
    transition: background-color 100ms ease;
}

.text-preview .word.highlighted {
    background-color: #3b82f6;
    color: #ffffff;
}

.pro-features-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid #374151;
}

.pro-feature {
    position: relative;
    opacity: 0.6;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pro-feature.unlocked {
    opacity: 1;
}

.pro-badge {
    color: #0a0a0a;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.pro-gated-btn {
    flex: 1;
}

.ssml-reference {
    background-color: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ssml-reference h4 {
    font-size: 14px;
    font-weight: 600;
    color: #d1d5db;
}

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

.ssml-tag-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ssml-tag-item code {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 13px;
    color: #3b82f6;
    background-color: #1a1a1a;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.ssml-tag-item span {
    font-size: 13px;
    color: #9ca3af;
}

.ssml-errors {
    background-color: #7f1d1d;
    border: 1px solid #dc2626;
    border-radius: 6px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ssml-errors h4 {
    font-size: 14px;
    font-weight: 600;
    color: #fca5a5;
}

.ssml-errors ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ssml-errors li {
    font-size: 13px;
    color: #fca5a5;
    padding-left: 12px;
    position: relative;
}

.ssml-errors li::before {
    content: '-';
    position: absolute;
    left: 0;
    color: #ef4444;
}

.bookmark-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
}

.bookmark-entry {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 6px;
    transition: background-color 150ms ease;
}

.bookmark-entry:hover {
    background-color: #242424;
}

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

.bookmark-name {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.bookmark-snippet {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bookmark-invalid {
    opacity: 0.4;
}

.bookmark-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.bookmark-actions button {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 150ms ease;
}

.bookmark-actions button:hover {
    color: #e5e7eb;
    background-color: #374151;
}

.bookmark-actions button.delete:hover {
    color: #ef4444;
}

.button-primary {
    background-color: #3b82f6;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.button-secondary {
    background-color: #1a1a1a;
    color: #e5e7eb;
    border: 1px solid #374151;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.pro-cta-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.pro-cta-text {
    font-size: 14px;
    color: #d1d5db;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
}

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

.modal-overlay.modal-visible {
    display: flex;
}

.modal {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 0;
    max-width: 480px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
}

.modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #e5e7eb;
}

.modal-content {
    padding: 24px;
}

.pro-features-list {
    margin-bottom: 24px;
}

.pro-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.feature-check {
    width: 20px;
    height: 20px;
    background-color: #059669;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.feature-text {
    font-size: 15px;
    color: #e5e7eb;
}

.modal-cta {
    width: 100%;
    display: block;
}

.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #e5e7eb;
    pointer-events: auto;
    animation: toastIn 200ms ease-out;
    max-width: 360px;
}

.toast.toast-error {
    border-color: #dc2626;
    color: #fca5a5;
}

.toast.toast-success {
    border-color: #059669;
    color: #6ee7b7;
}

.toast.toast-info {
    border-color: #3b82f6;
    color: #93c5fd;
}

.toast.toast-out {
    animation: toastOut 200ms ease-in forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

.footer {
    background-color: #0a0a0a;
    border-top: 1px solid #374151;
    padding: 32px 24px;
    text-align: center;
    margin-top: auto;
}

.footer p {
    font-size: 14px;
    color: #6b7280;
}

.text-preview::-webkit-scrollbar,
.bookmark-list::-webkit-scrollbar {
    width: 6px;
}

.text-preview::-webkit-scrollbar-track,
.bookmark-list::-webkit-scrollbar-track {
    background: transparent;
}

.text-preview::-webkit-scrollbar-thumb,
.bookmark-list::-webkit-scrollbar-thumb {
    background-color: #374151;
    border-radius: 3px;
}

.text-preview::-webkit-scrollbar-thumb:hover,
.bookmark-list::-webkit-scrollbar-thumb:hover {
    background-color: #4b5563;
}

@media (max-width: 768px) {
        padding: 32px 16px;
    }

        font-size: 28px;
        line-height: 36px;
    }

        font-size: 14px;
    }

    .tool-main {
        padding: 24px 16px 100px;
    }

    .tool-container {
        gap: 32px;
    }

    .settings-group {
        padding: 16px;
    }

    .output-section {
        padding: 16px;
    }

    .button-group {
        flex-direction: column;
    }

    .button-playback {
        flex: none;
        width: 100%;
    }

    .pro-cta-content {
        flex-direction: column;
        gap: 10px;
    }

        padding: 0 16px;
    }

    .button-primary,
    .button-secondary {
        width: 100%;
    }

    .toast-container {
        right: 16px;
        left: 16px;
    }

    .toast {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .text-area {
        min-height: 180px;
    }

    .ssml-tag-item code {
        font-size: 12px;
        word-break: break-all;
    }
}