.upload-option {
    position: relative;
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.upload-methods-container.disabled .upload-option {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(0.5);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background: #1e1e1e;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100vw;
}

.container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    color: #ffffff;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.app-name {
    font-size: 1.8rem;
    font-weight: 300;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.1rem;
    color: #8e8e93;
    font-weight: 400;
    margin: 0;
}

/* Main content */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Upload Section */
.upload-section {
    background: #2c2c2e;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #3a3a3c;
}

/* Two-column layout for upload methods */
.upload-methods-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

@media (max-width: 768px) {
    .upload-methods-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.upload-option {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.upload-area, .record-area {
    border: 2px dashed #48484a;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #1c1c1e;
    height: 300px;
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden;
}

.upload-area:hover, .upload-area.drag-over {
    border-color: #007aff;
    background: #001d3d;
}

.upload-area.has-file {
    border-color: #34c759;
    background: rgba(52, 199, 89, 0.08);
}

.upload-content, .record-content {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.upload-content h3, .record-content h3 {
    font-size: 1.2rem;
    margin: 0.5rem 0;
    color: #ffffff;
    font-weight: 400;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* New Session Button Container */
.new-session-container {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(52, 199, 89, 0.08);
    border: 1px solid rgba(52, 199, 89, 0.3);
    border-radius: 12px;
}

.btn-new-session {
    background: linear-gradient(135deg, #34c759 0%, #28a745 100%);
    color: white;
    border: none;
    padding: 0.9rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(52, 199, 89, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.btn-new-session:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 199, 89, 0.4);
    background: linear-gradient(135deg, #28a745 0%, #34c759 100%);
}

.btn-new-session:active {
    transform: translateY(0);
}

.new-session-hint {
    margin-top: 0.6rem;
    color: #8e8e93;
    font-size: 0.85rem;
    margin-bottom: 0;
}

.upload-icon, .record-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.upload-methods {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
    pointer-events: all;
}

.upload-methods p {
    color: #8e8e93;
    margin: 0;
    font-size: 0.9rem;
}

.styled-file-input {
    background: none;
    border: none;
    color: #007aff;
    cursor: pointer;
    font-weight: 400;
    font-size: inherit;
    font-family: inherit;
    padding: 4px 8px;
    border-radius: 4px;
    margin: 0;
}

.styled-file-input:hover {
    color: #0051d2;
}

.styled-file-input::file-selector-button {
    background: none;
    border: none;
    color: #007aff;
    cursor: pointer;
    font-weight: 400;
    font-size: inherit;
    font-family: inherit;
    padding: 4px 8px;
    border-radius: 4px;
    margin-right: 8px;
}

.styled-file-input::file-selector-button:hover {
    color: #0051d2;
    text-decoration: underline;
}

.file-info {
    color: #8e8e93;
    font-size: 0.8rem;
    margin-top: 1rem;
    word-wrap: break-word;
    max-width: 100%;
}

/* Recording area - now styled with upload-area */

.record-area:hover {
    border-color: #34c759;
    background: #0a2e0a;
}

.record-area.recording {
    border-color: #ff453a;
    background: rgba(255, 69, 58, 0.1);
    animation: pulse 1s ease-in-out infinite;
}

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

.record-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.record-area h3 {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: #ffffff;
}

.record-controls {
    margin: 1.5rem 0;
}

.btn-record {
    background: #34c759;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 400;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn-record:hover {
    background: #28a745;
    transform: translateY(-1px);
}

.btn-danger {
    background: #ff453a;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 400;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn-danger:hover {
    background: #e53e3e;
    transform: translateY(-1px);
}

.record-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.record-status {
    font-size: 0.9rem;
    color: #8e8e93;
    margin: 0;
}

.record-duration {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    margin: 0;
}

.upload-options {
    padding-top: 2rem;
    border-top: 1px solid #3a3a3c;
}

.option-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.option-group label {
    font-weight: 400;
    color: #ffffff;
    min-width: 140px;
    font-size: 0.95rem;
}

.option-group--stacked {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
}

.option-group--stacked label {
    margin-bottom: 0.2rem;
}

.option-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.teams-file-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.teams-file-status {
    font-size: 0.9rem;
    color: #d1d1d6;
    background: #1c1c1e;
    border: 1px dashed #48484a;
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    min-height: 42px;
    display: flex;
    align-items: center;
}

.teams-file-status.has-file {
    border-color: #34c759;
    color: #e5ffe8;
    background: rgba(52, 199, 89, 0.15);
}

.teams-file-hint {
    font-size: 0.8rem;
    color: #8e8e93;
}
.start-processing-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.2rem;
}

.start-processing-row .btn {
    min-width: 200px;
}

.start-processing-row .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.start-hint {
    color: #8e8e93;
    font-size: 0.85rem;
}


.mode-description {
    font-size: 0.85rem;
    color: #8e8e93;
    margin-top: 0.3rem;
    margin-left: 156px;
    font-style: italic;
}

.select-input {
    padding: 0.6rem 1rem;
    border: 1px solid #48484a;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #1c1c1e;
    color: #ffffff;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.select-input:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
}

/* Processing Section */
.processing-section {
    background: #2c2c2e;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #3a3a3c;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.progress-header h3 {
    font-size: 1.3rem;
    margin: 0;
    color: #ffffff;
    font-weight: 400;
}

.progress-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.processing-status {
    color: #007aff;
    font-weight: 400;
    font-size: 0.95rem;
}

.progress-bar {
    height: 6px;
    background: #3a3a3c;
    border-radius: 3px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007aff, #0051d2);
    width: 0%;
    transition: width 0.3s ease;
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}

.processing-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #1c1c1e;
    border-radius: 8px;
    border: 1px solid #3a3a3c;
}

.info-label {
    color: #8e8e93;
    font-size: 0.9rem;
}

.info-value {
    color: #ffffff;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Results Section */
.results-section {
    background: #2c2c2e;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #3a3a3c;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.results-header h3 {
    font-size: 1.3rem;
    color: #ffffff;
    font-weight: 400;
    margin: 0;
}

.results-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 400;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #007aff;
    color: white;
}

.btn-primary:hover {
    background: #0051d2;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #48484a;
    color: white;
}

.btn-secondary:hover {
    background: #636366;
    transform: translateY(-1px);
}

.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-item {
    background: #1c1c1e;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #3a3a3c;
    text-align: center;
}

.summary-label {
    color: #8e8e93;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.summary-value {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Speaker Management */
.speaker-management {
    margin-bottom: 2rem;
    background: #1c1c1e;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #3a3a3c;
}

.speaker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.speaker-header h4 {
    font-size: 1.1rem;
    color: #ffffff;
    font-weight: 400;
    margin: 0;
}

.speaker-list {
    display: grid;
    gap: 0.75rem;
}

.speaker-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
}

.speaker-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    color: #ffffff;
    font-size: 0.9rem;
    min-width: 0;
}

.speaker-name-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #48484a;
    border-radius: 6px;
    background: #2c2c2e;
    color: #ffffff;
    font-size: 0.9rem;
    min-width: 0;
    max-width: 100%;
}

.speaker-name-input:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
}

/* Transcript */
.transcript-container {
    background: #1c1c1e;
    border-radius: 8px;
    border: 1px solid #3a3a3c;
}

.transcript-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid #3a3a3c;
}

.transcript-header h4 {
    font-size: 1.1rem;
    color: #ffffff;
    font-weight: 400;
    margin: 0;
}

.transcript-options {
    display: flex;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #8e8e93;
    font-size: 0.85rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    accent-color: #007aff;
}

.transcript-content {
    padding: 1.5rem;
    background: #1c1c1e;
    border-radius: 0 0 8px 8px;
    color: #ffffff;
    line-height: 1.8;
    white-space: pre-wrap;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
    font-size: 0.95rem;
    max-height: 500px;
    overflow-y: auto;
}

/* Error Section */
.error-section {
    background: #2c2c2e;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #3a3a3c;
    text-align: center;
}

.error-container {
    max-width: 400px;
    margin: 0 auto;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.error-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #ffffff;
    font-weight: 400;
}

.error-message {
    color: #8e8e93;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: #8e8e93;
    font-size: 0.85rem;
    margin-top: auto;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #2c2c2e;
    color: #ffffff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid #3a3a3c;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-message {
    font-size: 0.9rem;
}

/* Responsive Design */

/* Tablet and smaller (768px and below) */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    /* Header adjustments */
    .header {
        margin-bottom: 2rem;
    }

    .app-name {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    /* Upload section */
    .upload-section {
        padding: 1.5rem;
    }

    /* Compact upload/record areas */
    .upload-area, .record-area {
        height: auto;
        min-height: 220px;
        padding: 1.5rem 1rem;
    }

    .upload-icon, .record-icon {
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
    }

    .upload-content h3, .record-content h3 {
        font-size: 1.1rem;
    }

    /* Results header */
    .results-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .results-header h3 {
        font-size: 1.2rem;
    }

    .results-actions {
        justify-content: stretch;
        flex-direction: column;
    }

    .results-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Progress section */
    .progress-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .progress-header h3 {
        font-size: 1.2rem;
    }

    .progress-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .progress-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .processing-info {
        grid-template-columns: 1fr;
    }

    /* Summary grid - 2 columns on tablet */
    .results-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .summary-item {
        padding: 0.75rem;
    }

    .summary-label {
        font-size: 0.8rem;
    }

    .summary-value {
        font-size: 1.1rem;
    }

    /* Options */
    .option-group {
        flex-direction: column;
        align-items: stretch;
    }

    .option-group label {
        min-width: auto;
    }

    /* Speaker management */
    .speaker-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }

    .speaker-header .btn {
        width: 100%;
    }

    .speaker-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        background: #2c2c2e;
        padding: 0.75rem;
        border-radius: 8px;
        border: 1px solid #3a3a3c;
    }

    .speaker-label {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .speaker-name-input {
        width: 100%;
        font-size: 0.9rem;
        padding: 0.7rem 0.85rem;
        min-height: 44px;
    }

    .speaker-inline-actions {
        width: 100%;
        justify-content: stretch;
        gap: 0.5rem;
    }

    .speaker-preview-btn {
        flex: 1;
        min-height: 44px;
        font-size: 0.9rem;
        padding: 0.7rem 1rem;
        justify-content: center;
    }

    /* Transcript */
    .transcript-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .transcript-options {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .transcript-content {
        font-size: 0.9rem;
        max-height: 400px;
    }

    /* Start processing row */
    .start-processing-row {
        flex-direction: column;
        align-items: stretch;
    }

    .start-processing-row .btn {
        width: 100%;
        min-width: auto;
    }

    .start-hint {
        text-align: center;
        margin-top: 0.5rem;
    }
}

/* Mobile phones (480px and below) */
@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
    }

    /* Header */
    .header {
        margin-bottom: 1.5rem;
    }

    .logo-container {
        gap: 0.6rem;
        margin-bottom: 1rem;
    }

    .logo {
        width: 28px;
        height: 28px;
    }

    .app-name {
        font-size: 1.3rem;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    /* Sections */
    .upload-section,
    .processing-section,
    .results-section,
    .error-section {
        padding: 1rem;
        border-radius: 10px;
    }

    /* Upload areas - more compact on mobile */
    .upload-area, .record-area {
        min-height: 180px;
        height: auto;
        padding: 1rem 0.5rem;
        max-width: 100%;
    }

    .upload-icon, .record-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .upload-content, .record-content {
        padding: 0 0.25rem;
        max-width: 100%;
    }

    .upload-content h3, .record-content h3 {
        font-size: 0.95rem;
        margin: 0.4rem 0;
        text-align: center;
        padding: 0 0.25rem;
        line-height: 1.3;
    }

    .file-info {
        font-size: 0.75rem;
        margin-top: 0.75rem;
    }

    /* Record controls */
    .record-controls {
        margin: 1rem 0;
    }

    .btn-record, .btn-danger {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .record-status {
        font-size: 0.85rem;
    }

    .record-duration {
        font-size: 1rem;
    }

    /* New session button */
    .new-session-container {
        padding: 1rem;
    }

    .btn-new-session {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }

    /* Buttons - larger touch targets */
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        min-height: 44px; /* iOS recommended touch target */
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    /* Summary - single column on mobile */
    .results-summary {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .summary-item {
        padding: 0.75rem 0.5rem;
    }

    /* Speaker management */
    .speaker-management {
        padding: 1rem;
    }

    .speaker-header {
        gap: 0.5rem;
    }

    .speaker-header h4,
    .transcript-header h4 {
        font-size: 1rem;
    }

    .speaker-list {
        gap: 0.5rem;
    }

    .speaker-item {
        gap: 0.5rem;
        padding: 0.65rem;
    }

    .speaker-label {
        font-size: 0.85rem;
        gap: 0.4rem;
    }

    .speaker-name-input {
        font-size: 0.85rem;
        padding: 0.65rem 0.75rem;
        width: 100%;
        min-height: 44px;
    }

    .speaker-inline-actions {
        display: flex;
        width: 100%;
        gap: 0.4rem;
    }

    .speaker-preview-btn {
        font-size: 0.85rem;
        padding: 0.65rem 0.85rem;
        width: 100%;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
    }

    /* Transcript */
    .transcript-container {
        border-radius: 8px;
    }

    .transcript-header {
        padding: 1rem;
    }

    .transcript-content {
        padding: 1rem;
        font-size: 0.85rem;
        max-height: 350px;
        line-height: 1.6;
    }

    .segment-timestamp {
        font-size: 0.75rem;
        display: block;
        margin-bottom: 0.25rem;
    }

    .segment-speaker {
        font-size: 0.85rem;
    }

    .segment-text {
        font-size: 0.85rem;
    }

    .checkbox-label {
        font-size: 0.8rem;
    }

    /* Processing section */
    .progress-header h3,
    .results-header h3,
    .error-section h3 {
        font-size: 1.1rem;
    }

    .processing-status {
        font-size: 0.85rem;
        text-align: center;
    }

    .info-item {
        padding: 0.6rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .info-label,
    .info-value {
        font-size: 0.85rem;
    }

    /* Teams file options */
    .teams-file-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .teams-file-row .btn {
        width: 100%;
    }

    .teams-file-status {
        font-size: 0.85rem;
        padding: 0.6rem 0.75rem;
    }

    .teams-file-hint {
        font-size: 0.75rem;
        line-height: 1.4;
    }

    /* Toast notifications */
    .toast {
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        padding: 0.875rem 1.25rem;
    }

    .toast-message {
        font-size: 0.85rem;
    }

    /* Error section */
    .error-icon {
        font-size: 3rem;
    }

    .error-message {
        font-size: 0.9rem;
    }

    /* Footer */
    .footer {
        padding: 1.5rem 0;
        font-size: 0.8rem;
    }

    /* Upload options */
    .upload-options {
        padding-top: 1.5rem;
    }

    .option-group--stacked {
        gap: 0.5rem;
    }

    .option-group--stacked label {
        font-size: 0.9rem;
    }

    .select-input {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }

    .mode-description {
        font-size: 0.8rem;
        margin-left: 0;
    }
}

/* Very small phones (360px and below) */
@media (max-width: 360px) {
    .container {
        padding: 0.5rem;
    }

    .header {
        margin-bottom: 1rem;
    }

    .app-name {
        font-size: 1.2rem;
    }

    .subtitle {
        font-size: 0.8rem;
    }

    .upload-section,
    .processing-section,
    .results-section {
        padding: 0.75rem;
    }

    .upload-area, .record-area {
        min-height: 160px;
        height: auto;
        padding: 0.75rem 0.25rem;
        max-width: 100%;
    }

    .upload-content, .record-content {
        padding: 0 0.15rem;
    }

    .upload-content h3, .record-content h3 {
        font-size: 0.85rem;
        line-height: 1.2;
        padding: 0 0.15rem;
    }

    .upload-icon, .record-icon {
        font-size: 1.75rem;
    }

    .btn {
        font-size: 0.8rem;
        padding: 0.7rem 0.85rem;
    }

    .transcript-content {
        max-height: 300px;
        font-size: 0.8rem;
    }
}

/* Landscape orientation fixes for phones */
@media (max-height: 600px) and (orientation: landscape) {
    .upload-area, .record-area {
        min-height: 140px;
        padding: 1rem;
    }

    .transcript-content {
        max-height: 250px;
    }

    .header {
        margin-bottom: 1rem;
    }

    .main {
        gap: 1rem;
    }
}
.option-note {
    padding: 0.5rem 0;
    color: #8e8e93;
    font-size: 0.9rem;
    font-style: italic;
}

.audio-player {
    width: 100%;
    margin-bottom: 1rem;
    border: 1px solid #3a3a3c;
    border-radius: 12px;
    padding: 1rem;
    background: #1c1c1e;
}

.audio-player audio {
    width: 100%;
}

.speaker-inline-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    align-items: center;
}

.speaker-preview-btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
}

.transcript-segment {
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    transition: background 0.2s ease;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.transcript-segment:hover {
    background: rgba(60, 60, 67, 0.18);
    cursor: pointer;
}

.transcript-segment.active {
    background: rgba(52, 199, 89, 0.24);
    border-left: 3px solid #34c759;
}

.segment-timestamp {
    color: #8e8e93;
    font-family: "SF Mono", "Roboto Mono", monospace;
    margin-right: 0.5rem;
}

.segment-speaker {
    color: #34c759;
    font-weight: 600;
    margin-right: 0.4rem;
}

.segment-text {
    color: #f5f5f7;
}
