/* ========================================
   Testimonial Collector - Main Styles
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-tertiary: #1a1a1a;
    --bg-card: rgba(30, 30, 30, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --accent: #e84c1e;
    --accent-hover: #ff5722;
    --accent-glow: rgba(232, 76, 30, 0.3);
    --phoenix-gradient: linear-gradient(135deg, #e84c1e 0%, #c43e15 100%);
    --success: #10b981;
    --error: #ef4444;
    --border: rgba(255, 255, 255, 0.1);
    --glass: rgba(255, 255, 255, 0.05);
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

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

html, body {
    height: 100%;
    font-family: 'Outfit', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
}

/* Logo */
.logo {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 100;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    height: 45px;
    width: auto;
}

/* ========================================
   Main Layout - 50/50 Split
   ======================================== */

.container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

.panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

/* Left Panel - User Response */
.panel-left {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    z-index: 2;
}

.panel-left::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, var(--accent-glow) 0%, transparent 50%);
    opacity: 0.5;
    pointer-events: none;
}

/* Right Panel - Team Video */
.panel-right {
    background: var(--bg-secondary);
    position: relative;
}

.panel-right::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--bg-primary) 0%, transparent 10%);
    pointer-events: none;
    z-index: 1;
}

/* ========================================
   Video Container
   ======================================== */

.video-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.team-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    color: var(--text-secondary);
    text-align: center;
}

.video-placeholder svg {
    width: 80px;
    height: 80px;
    opacity: 0.5;
}

.video-placeholder p {
    font-size: 1.1rem;
    max-width: 300px;
}

/* ========================================
   Response Area
   ======================================== */

.response-area {
    max-width: 500px;
    width: 100%;
    z-index: 10;
}

.greeting {
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease-out;
}

.greeting h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.greeting p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.user-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.info-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    backdrop-filter: blur(10px);
}

.info-badge svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.info-badge strong {
    color: var(--accent);
    font-weight: 600;
}

/* ========================================
   Response Options
   ======================================== */

.response-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.response-options h2 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.option-buttons {
    display: flex;
    gap: 1rem;
}

.option-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.option-btn:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px var(--accent-glow);
}

.option-btn:active {
    transform: scale(0.97);
}

.option-btn.active {
    border-color: var(--accent);
    background: rgba(232, 76, 30, 0.15);
}

.option-btn svg {
    width: 32px;
    height: 32px;
    color: var(--accent);
}

.option-btn span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ========================================
   Recording Interface
   ======================================== */

.recorder-container {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeInUp 0.4s ease-out;
}

.recorder-container.active {
    display: flex;
}

/* Mobile fullscreen recording mode - TikTok/Shorts style */
@media (max-width: 768px) {
    .recorder-container.active {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9999;
        background: #000;
        padding: 0;
        margin: 0;
        gap: 0;
        display: flex;
        flex-direction: column;
        animation: fadeIn 0.2s ease-out;
    }
    
    .recorder-container .preview-container {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        aspect-ratio: unset;
        border-radius: 0;
        border: none;
        background: #000;
    }
    
    .recorder-container .preview-video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 0;
    }
    
    .recorder-container .recording-indicator {
        top: env(safe-area-inset-top, 1rem);
        left: 50%;
        transform: translateX(-50%);
        top: calc(env(safe-area-inset-top, 0px) + 1rem);
    }
    
    .recorder-container .recorder-controls {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 1.5rem;
        padding: 2rem;
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 2rem);
        background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, transparent 100%);
        z-index: 10;
    }
    
    .recorder-container .btn-record {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 4px solid white;
        background: var(--error);
    }
    
    .recorder-container .btn-record.recording {
        background: white;
        animation: none;
    }
    
    .recorder-container .btn-record.recording svg {
        color: var(--error);
    }
    
    .recorder-container .btn-record svg {
        width: 32px;
        height: 32px;
        color: white;
    }
    
    .recorder-container .btn-record span,
    .recorder-container #recordBtnText {
        display: none;
    }
    
    .recorder-container .btn-stop {
        display: none;
    }
    
    .recorder-container .btn-submit {
        position: absolute;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 2rem);
        right: 1.5rem;
        padding: 0.875rem 1.5rem;
        border-radius: 999px;
        font-size: 1rem;
        z-index: 10;
    }
    
    /* Removed - submit button is now inside post-recording-controls */
    
    /* Back button positioned top-left in fullscreen mode */
    .recorder-container #backBtn {
        display: none;
    }
    
    /* Audio visualizer fullscreen */
    .recorder-container .audio-visualizer {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, #1a1a2e 0%, #0a0a0a 100%);
    }
    
    .recorder-container .audio-bar {
        width: 8px;
        border-radius: 4px;
    }
    
    /* Upload container fullscreen on mobile too */
    .upload-container.active {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9999;
        background: var(--bg-primary);
        padding: 1.5rem;
        padding-top: calc(env(safe-area-inset-top, 0px) + 4rem);
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 1.5rem);
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 1rem;
        animation: fadeIn 0.2s ease-out;
    }
    
    .upload-container .recorder-controls {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .upload-container .btn-stop {
        display: none;
    }
}

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

/* Mobile close button */
.mobile-close-btn {
    display: none;
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    z-index: 100;
}

.mobile-close-btn svg {
    width: 24px;
    height: 24px;
}

.mobile-close-btn:active {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .mobile-close-btn {
        display: flex;
    }
    
    .recorder-container .mobile-close-btn {
        position: fixed;
        top: calc(env(safe-area-inset-top, 0px) + 1rem);
        left: 1rem;
        z-index: 10000;
        transition: opacity 0.3s ease;
    }
    
    .upload-container .mobile-close-btn {
        position: fixed;
        top: calc(env(safe-area-inset-top, 0px) + 1rem);
        left: 1rem;
        z-index: 10000;
    }
    
    /* Hide logo and close button during recording */
    body.is-recording .logo,
    body.is-recording .mobile-close-btn {
        opacity: 0;
        pointer-events: none;
    }
    
    /* Hide logo and close button after recording (has-recording state) */
    body.has-recording .logo,
    body.has-recording .mobile-close-btn {
        opacity: 0;
        pointer-events: none;
    }
    
    /* Post-recording controls on mobile - only visible when has 'show' class */
    #postRecordingControls {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        display: none;
        flex-direction: row;
        justify-content: center;
        align-items: stretch;
        gap: 0.75rem;
        padding: 1.5rem;
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 1.5rem);
        background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, transparent 100%);
        z-index: 10;
    }
    
    #postRecordingControls.show {
        display: flex !important;
    }
    
    #postRecordingControls .btn-submit,
    #postRecordingControls .btn-startover {
        flex: 1 !important;
        position: relative !important;
        bottom: auto !important;
        right: auto !important;
        left: auto !important;
        width: 50% !important;
        max-width: none !important;
        padding: 1rem 0.75rem !important;
        font-size: 0.95rem !important;
        border-radius: 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
    }
    
    #postRecordingControls .btn-submit {
        background: var(--accent) !important;
        color: var(--bg-primary) !important;
        border: none !important;
        box-shadow: 0 4px 20px var(--accent-glow) !important;
    }
    
    #postRecordingControls .btn-startover {
        background: rgba(255,255,255,0.15) !important;
        color: var(--text-primary) !important;
        border: 1px solid rgba(255,255,255,0.3) !important;
    }
}

.preview-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg-tertiary);
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--border);
}

.preview-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.audio-visualizer {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.audio-bar {
    width: 6px;
    height: 20%;
    background: var(--accent);
    border-radius: 3px;
    animation: audioWave 0.5s ease-in-out infinite alternate;
}

.audio-bar:nth-child(2) { animation-delay: 0.1s; }
.audio-bar:nth-child(3) { animation-delay: 0.2s; }
.audio-bar:nth-child(4) { animation-delay: 0.3s; }
.audio-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes audioWave {
    0% { height: 20%; }
    100% { height: 80%; }
}

.recording-indicator {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(239, 68, 68, 0.9);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.recording-indicator.active {
    opacity: 1;
}

.recording-indicator .dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: pulse 1s ease-in-out infinite;
}

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

.timer {
    font-variant-numeric: tabular-nums;
}

.recorder-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 999px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    min-height: 48px; /* Minimum touch target */
}

.btn-record {
    background: var(--error);
    color: white;
}

.btn-record:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.btn-record.recording {
    animation: recordingPulse 1.5s ease-in-out infinite;
}

@keyframes recordingPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 0 15px rgba(239, 68, 68, 0); }
}

.btn-stop {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-stop:hover {
    border-color: var(--text-secondary);
}

.btn-submit {
    background: var(--accent);
    color: var(--bg-primary);
}

.btn-submit:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

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

/* Post-recording controls - uses same .recorder-controls styling */

.btn-startover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-startover:hover {
    border-color: var(--text-secondary);
    background: var(--bg-secondary);
}

/* ========================================
   Upload Area
   ======================================== */

.upload-container {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeInUp 0.4s ease-out;
}

.upload-container.active {
    display: flex;
}

.upload-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem 2rem;
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--accent);
    background: rgba(245, 158, 11, 0.05);
}

.upload-dropzone svg {
    width: 48px;
    height: 48px;
    color: var(--accent);
}

.upload-dropzone p {
    color: var(--text-secondary);
    text-align: center;
}

.upload-dropzone strong {
    color: var(--accent);
}

.file-input {
    display: none;
}

.selected-file {
    display: none;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.selected-file.active {
    display: flex;
}

.file-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    border-radius: 12px;
}

.file-icon svg {
    width: 24px;
    height: 24px;
    color: var(--bg-primary);
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.file-size {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.remove-file {
    padding: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.remove-file:hover {
    color: var(--error);
}

/* ========================================
   Success State
   ======================================== */

.success-message {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    padding: 2rem;
    animation: fadeInUp 0.6s ease-out;
}

.success-message.active {
    display: flex;
}

.success-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--success);
    border-radius: 50%;
    animation: successPop 0.5s ease-out;
}

@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.success-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.success-message h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.success-message p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.btn-new {
    padding: 0.75rem 1.5rem;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-new:hover {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}

/* ========================================
   Loading State
   ======================================== */

.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.95);
    z-index: 100;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Upload Progress Bar */
.upload-progress {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.upload-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 999px;
    overflow: hidden;
}

.upload-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--phoenix-gradient);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.upload-progress-text {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

/* ========================================
   Animations
   ======================================== */

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

/* ========================================
   Responsive Design - Mobile First (VideoAsk Style)
   ======================================== */

@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }
    
    .panel-right {
        flex: none;
        height: 35vh;
        min-height: 200px;
    }
    
    .panel-left {
        flex: 1;
        height: auto;
        min-height: 65vh;
    }
    
    .panel-right::after {
        background: linear-gradient(180deg, transparent 70%, var(--bg-primary) 100%);
    }
    
    .greeting h1 {
        font-size: 1.75rem;
    }
    
    .logo {
        top: 1rem;
        left: 1rem;
    }
    
    .logo img {
        height: 35px;
    }
}

@media (max-width: 768px) {
    html, body {
        overflow: auto;
        height: auto;
        min-height: 100vh;
    }
    
    .container {
        flex-direction: column;
        min-height: 100vh;
        height: auto;
    }
    
    /* Mobile: Team video at top, smaller */
    .panel-right {
        flex: none;
        height: 30vh;
        min-height: 180px;
        max-height: 250px;
        order: 1;
    }
    
    .panel-left {
        flex: 1;
        order: 2;
        padding: 1.5rem;
        padding-bottom: 2rem;
        min-height: auto;
    }
    
    .panel-left::before {
        display: none;
    }
    
    .response-area {
        max-width: 100%;
    }
    
    .greeting {
        margin-bottom: 1.5rem;
    }
    
    .greeting h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .greeting p {
        font-size: 0.95rem;
    }
    
    .user-info {
        gap: 0.5rem;
    }
    
    .info-badge {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
    
    /* Mobile option buttons - horizontal scroll or grid */
    .response-options {
        margin-bottom: 1.5rem;
    }
    
    .response-options h2 {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }
    
    .option-buttons {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    
    .option-btn {
        padding: 1rem 0.5rem;
        border-radius: 12px;
    }
    
    .option-btn svg {
        width: 28px;
        height: 28px;
    }
    
    .option-btn span {
        font-size: 0.8rem;
    }
    
    /* Mobile recorder */
    .recorder-container {
        gap: 1rem;
    }
    
    .preview-container {
        aspect-ratio: 4/3;
        border-radius: 12px;
    }
    
    .recorder-controls {
        gap: 0.75rem;
    }
    
    .control-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
        border-radius: 12px;
    }
    
    /* Mobile upload */
    .upload-dropzone {
        padding: 2rem 1rem;
        border-radius: 12px;
    }
    
    .upload-dropzone svg {
        width: 36px;
        height: 36px;
    }
    
    .upload-dropzone p {
        font-size: 0.9rem;
    }
    
    /* Mobile success */
    .success-message {
        padding: 1.5rem;
    }
    
    .success-icon {
        width: 64px;
        height: 64px;
    }
    
    .success-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .success-message h2 {
        font-size: 1.5rem;
    }
    
    .success-message p {
        font-size: 0.9rem;
    }
    
    /* Mobile logo */
    .logo {
        position: absolute;
        top: 0.75rem;
        left: 0.75rem;
        z-index: 50;
    }
    
    .logo img {
        height: 30px;
    }
}

/* Extra small devices */
@media (max-width: 375px) {
    .panel-left {
        padding: 1rem;
    }
    
    .greeting h1 {
        font-size: 1.35rem;
    }
    
    .greeting p {
        font-size: 0.9rem;
    }
    
    .option-buttons {
        gap: 0.5rem;
    }
    
    .option-btn {
        padding: 0.75rem 0.25rem;
    }
    
    .option-btn svg {
        width: 24px;
        height: 24px;
    }
    
    .option-btn span {
        font-size: 0.75rem;
    }
    
    .control-btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
}

/* Landscape mobile */
@media (max-width: 900px) and (orientation: landscape) {
    .container {
        flex-direction: row;
    }
    
    .panel-right {
        flex: none;
        width: 40%;
        height: 100vh;
        max-height: none;
        order: 2;
    }
    
    .panel-left {
        flex: 1;
        width: 60%;
        order: 1;
        overflow-y: auto;
    }
    
    .panel-right::after {
        background: linear-gradient(90deg, var(--bg-primary) 0%, transparent 15%);
    }
    
    .logo {
        position: fixed;
    }
}

/* Safe area for notched phones */
@supports (padding: env(safe-area-inset-bottom)) {
    @media (max-width: 768px) {
        .panel-left {
            padding-bottom: calc(2rem + env(safe-area-inset-bottom));
        }
        
        .recorder-controls,
        .upload-container .recorder-controls {
            padding-bottom: env(safe-area-inset-bottom);
        }
    }
}

