@charset "UTF-8";

/* CSS Custom Properties for Theme Support */
:root {
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-muted: #666666;
    --border-color: #e1e5e9;
    --hover-bg: #f8f9fa;
    --shadow: rgba(0,0,0,0.1);
    --record-color: #dc3545;
    --play-color: #28a745;
    --pause-color: #ffc107;
    --font-color: #333333;
    --content-bg-color: #ffffff;
    --alt-content-bg-color: #f8f9fa;
    --alt-font-color: #666666;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --card-bg: #2d2d2d;
    --text-color: #e0e0e0;
    --text-muted: #b0b0b0;
    --border-color: #404040;
    --hover-bg: #404040;
    --shadow: rgba(0,0,0,0.3);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--font-color);
    padding-top: 40px;
}

.main-container {
    width: 940px;
    margin: 20px auto;
    padding: 0 20px;
}

.recorder-container {
    background: var(--content-bg-color);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 0 30px 30px 30px;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .recorder-container {
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

h1 {
    text-align: center;
    color: var(--font-color);
    margin-bottom: 10px;
    font-size: 2rem;
}

/* Privacy Notice */
.privacy-notice {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border-left: 4px solid #4CAF50;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

[data-theme="dark"] .privacy-notice {
    background: linear-gradient(135deg, #1a3d1a 0%, #2a4d2a 100%);
    border-color: #4a7c4a;
}

.privacy-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.privacy-title {
    color: #2d5a2d;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 8px 0;
}

[data-theme="dark"] .privacy-title {
    color: #66cc66;
}

.privacy-description {
    color: #4a7c4a;
    font-size: 0.95rem;
    margin: 0;
}

[data-theme="dark"] .privacy-description {
    color: #88aa88;
}

/* Recording Section */
.recording-section {
    background: var(--alt-content-bg-color);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.record-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-record {
    background: #dc3545;
    color: white;
}

.btn-record:hover:not(:disabled) {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220,53,69,0.3);
}

.btn-stop {
    background: #6c757d;
    color: white;
}

.btn-stop:hover:not(:disabled) {
    background: #545b62;
    transform: translateY(-2px);
}

.btn-pause {
    background: #ffc107;
    color: #212529;
}

.btn-pause:hover:not(:disabled) {
    background: #e0a800;
    transform: translateY(-2px);
}

.btn-play {
    background: #28a745;
    color: white;
}

.btn-play:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-2px);
}

.btn-download {
    background: #007bff;
    color: white;
}

.btn-download:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-2px);
}

.btn-delete {
    background: #dc3545;
    color: white;
    min-width: auto;
    padding: 8px 12px;
    width: 100%;
}

.btn-delete:hover:not(:disabled) {
    background: #c82333;
    transform: translateY(-2px);
}

/* Recording Status */
#statusText, #recordingTimer {
    color: #333;
}

.recording-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #fdfdfd;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    transform-origin: center;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pulse-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #6c757d;
    transition: all 0.3s ease;
}

.pulse-dot.recording {
    background: #dc3545;
    animation: pulse 1s infinite;
    box-shadow: 0 0 10px rgba(220,53,69,0.5);
}

.pulse-dot.paused {
    background: #ffc107;
    animation: none;
    box-shadow: 0 0 10px rgba(255,193,7,0.5);
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.recording-timer {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--font-color);
}

/* Audio Level Meter */
.audio-level-container {
    margin-top: 15px;
}

.audio-level-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--font-color);
}

.level-meter {
    width: 100%;
    height: 20px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    margin-top: 15px;
}

.level-meter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 2px,
        rgba(255,255,255,0.1) 2px,
        rgba(255,255,255,0.1) 4px
    );
    pointer-events: none;
}

.level-bar {
    height: 100%;
    background: linear-gradient(to right, #28a745 0%, #ffc107 70%, #dc3545 100%);
    width: 0%;
    transition: width 0.1s ease;
    position: relative;
}

/* Audio Input and Level Container */
.audio-input-level-container {
    display: flex;
    gap: 20px;
    align-items: start;
    margin-top: 15px;
}

.audio-input-group {
    flex: 1;
    min-width: 200px;
}

.audio-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--font-color);
}

.audio-input-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background: var(--content-bg-color);
    color: var(--font-color);
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.audio-input-group select:focus {
    outline: none;
    border-color: #007bff;
}

.audio-level-group {
    flex: 2;
    min-width: 150px;
    position: relative;
}

.audio-level-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--font-color);
}

.monitoring-indicator {
    position: absolute;
    top: 10px;
    right: 0;
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.monitoring-indicator.active {
    opacity: 1;
    animation: pulse 2s infinite;
}

/* Download buttons styling */
.download-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-download-format {
    background: #007bff;
    color: white;
    min-width: auto;
    padding: 6px 10px;
    font-size: 0.8rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-download-format:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-download-format.webm {
    background: #17a2b8;
}

.btn-download-format.webm:hover:not(:disabled) {
    background: #138496;
}

.btn-download-format.wav {
    background: #28a745;
}

.btn-download-format.wav:hover:not(:disabled) {
    background: #218838;
}

.btn-download-format.mp3 {
    background: #fd7e14;
}

.btn-download-format.mp3:hover:not(:disabled) {
    background: #e8660f;
}

/* Recordings Section */
.recordings-section {
    background: var(--alt-content-bg-color);
    border-radius: 12px;
    padding: 0 25px 25px 25px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.recordings-section h3 {
    color: var(--font-color);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.recording-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--content-bg-color);
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
}

.recording-info {
    flex: 1;
}

.recording-name {
    font-weight: 600;
    color: var(--font-color);
    margin-bottom: 4px;
}

.recording-details {
    color: var(--font-color);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.recording-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin-bottom: -35px;
}

.recording-controls .btn-delete {
    order: 1;
}

.recording-controls .download-buttons {
    order: 2;
}

/* Settings Section */
.settings-section {
    background: var(--alt-content-bg-color);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid var(--border-color);
}

.settings-section h3 {
    color: var(--font-color);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.setting-group {
    display: flex;
    flex-direction: column;
}

.setting-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--font-color);
}

.setting-group select {
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background: var(--content-bg-color);
    color: var(--font-color);
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.setting-group select:focus {
    outline: none;
    border-color: #007bff;
}

/* Audio Player Styling */
.audio-player {
    width: 100%;
    margin: 10px 0;
    background: var(--content-bg-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Custom audio player controls for better dark mode support */
.audio-player::-webkit-media-controls-panel {
    background-color: var(--content-bg-color);
    border-radius: 8px;
}

.audio-player::-webkit-media-controls-play-button,
.audio-player::-webkit-media-controls-pause-button {
    background-color: var(--content-bg-color);
    border-radius: 50%;
}

.audio-player::-webkit-media-controls-timeline {
    background-color: var(--border-color);
    border-radius: 4px;
}

.audio-player::-webkit-media-controls-current-time-display,
.audio-player::-webkit-media-controls-time-remaining-display {
    color: var(--font-color);
}

/* Firefox audio player styling */
.audio-player::-moz-range-track {
    background-color: var(--border-color);
    border-radius: 4px;
}

.audio-player::-moz-range-thumb {
    background-color: #007bff;
    border: none;
    border-radius: 50%;
}

/* Custom Audio Player Wrapper for better control */
.custom-audio-player {
    background: var(--content-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    margin: 10px 0;
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.play-pause-btn {
    background: transparent;
    color: white;
    border: none;
    width: 40px;
    height: 38px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 31px;
    padding-bottom: 4px;
}

.play-pause-btn:hover {
    border: 2px solid red;
}

.time-display {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--font-color);
    min-width: 100px;
    text-align: center;
}

.progress-container {
    flex: 1;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #007bff;
    border-radius: 3px;
    width: 0%;
    transition: width 0.05s ease-out; /* Smoother animation */
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

.volume-slider {
    width: 60px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: none;
}

/* Loading states for conversion */
.btn.converting {
    position: relative;
    pointer-events: none;
}

.btn.converting::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Conversion progress indicator */
.conversion-progress {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--content-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    z-index: 1000;
    text-align: center;
    min-width: 200px;
}

.conversion-progress .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.conversion-progress p {
    margin: 0;
    color: var(--font-color);
    font-weight: 600;
}

/* Add these animated background styles */

/* Recording background - animated light red gradient with stronger pulse */
.recording-bg {
    background: linear-gradient(45deg, #ffcccc, #ff9999, #ffcccc, #ff6666) !important;
    background-size: 400% 400% !important;
    animation: recordingPulse 1.5s ease-in-out infinite !important;
    border: 2px solid rgba(255, 99, 99, 0.6) !important;
    box-shadow: 0 0 20px rgba(255, 99, 99, 0.4) !important;
}

@keyframes recordingPulse {
    0% {
        background-position: 0% 50%;
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 99, 99, 0.4);
    }
    50% {
        background-position: 100% 50%;
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(255, 99, 99, 0.7);
    }
    100% {
        background-position: 0% 50%;
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 99, 99, 0.4);
    }
}

/* Paused background - animated light orange/yellow gradient with stronger pulse */
.paused-bg {
    background: linear-gradient(45deg, #fff3cd, #ffdf7e, #fff3cd, #ffcc33) !important;
    background-size: 400% 400% !important;
    animation: pausedPulse 1.2s ease-in-out infinite !important;
    border: 2px solid rgba(255, 193, 7, 0.6) !important;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.4) !important;
}

@keyframes pausedPulse {
    0% {
        background-position: 0% 50%;
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 193, 7, 0.4);
    }
    50% {
        background-position: 100% 50%;
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(255, 193, 7, 0.7);
    }
    100% {
        background-position: 0% 50%;
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 193, 7, 0.4);
    }
}

/* Ensure the recording status element has proper styling */
.recording-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #fdfdfd;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Make sure the animation overrides work */
.recording-status.recording-bg,
.recording-status.paused-bg {
    border-color: transparent;
}

/* Add breathing effect to the pulse dot too */
.pulse-dot.recording {
    background: #dc3545;
    animation: pulseDotRecording 1s infinite;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
}

.pulse-dot.paused {
    background: #ffc107;
    animation: pulseDotPaused 1.2s infinite;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}

@keyframes pulseDotRecording {
    0% { 
        transform: scale(1); 
        opacity: 1;
        box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
    }
    50% { 
        transform: scale(1.4); 
        opacity: 0.8;
        box-shadow: 0 0 20px rgba(220, 53, 69, 0.8);
    }
    100% { 
        transform: scale(1); 
        opacity: 1;
        box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
    }
}

@keyframes pulseDotPaused {
    0% { 
        transform: scale(1); 
        opacity: 1;
        box-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
    }
    50% { 
        transform: scale(1.3); 
        opacity: 0.7;
        box-shadow: 0 0 20px rgba(255, 193, 7, 0.8);
    }
    100% { 
        transform: scale(1); 
        opacity: 1;
        box-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
    }
}

/* Update notification styling for better stacking */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: #28a745;
    border-left: 4px solid #1e7e34;
}

.notification.error {
    background: #dc3545;
    border-left: 4px solid #bd2130;
}

.notification.info {
    background: #17a2b8;
    border-left: 4px solid #117a8b;
}

/* Stack notifications by adjusting their top position */
.notification:nth-of-type(1) {
    top: 20px;
}

.notification:nth-of-type(2) {
    top: 80px;
}

.notification:nth-of-type(3) {
    top: 140px;
}

.notification:nth-of-type(4) {
    top: 200px;
}

.notification:nth-of-type(5) {
    top: 260px;
}

/* Alternative approach - use a notification container */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.notification-container .notification {
    position: relative;
    top: auto;
    right: auto;
    pointer-events: auto;
}

/* Update the responsive design approach */
.main-container {
    width: 940px;
    margin: 20px auto;
    padding: 0 20px;
}

.recorder-container {
    background: var(--content-bg-color);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 0 30px 30px 30px;
    border: 1px solid var(--border-color);
}

/* Mobile-first responsive design */
@media (max-width: 1024px) {
    .main-container {
        width: 100%;
        max-width: 800px;
        margin: 10px auto;
        padding: 0 15px;
    }
    
    .recorder-container {
        padding: 0 20px 20px 20px;
    }
    
    .audio-input-level-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .audio-input-group,
    .audio-level-group {
        min-width: 0;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 20px;
    }
    
    .main-container {
        width: 100%;
        margin: 5px auto;
        padding: 0 10px;
    }
    
    .recorder-container {
        padding: 0 15px 15px 15px;
        border-radius: 8px;
    }
    
    /* Header adjustments */
    h1 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    /* Privacy notice - mobile layout */
    .privacy-notice {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .privacy-icon {
        font-size: 1.5rem;
    }
    
    .privacy-title {
        font-size: 1rem;
    }
    
    .privacy-description {
        font-size: 0.9rem;
    }
    
    /* Recording section - mobile layout */
    .recording-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    /* Record controls - mobile layout */
    .record-controls {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        padding: 15px 20px;
        font-size: 1rem;
        justify-content: center;
    }
    
    /* Recording status - mobile layout */
    .recording-status {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
        text-align: center;
    }
    
    .status-indicator {
        justify-content: center;
    }
    
    .recording-timer {
        font-size: 1.5rem;
    }
    
    /* Audio input and level - mobile layout */
    .audio-input-level-container {
        flex-direction: column;
        gap: 15px;
        margin-top: 15px;
    }
    
    .audio-input-group,
    .audio-level-group {
        width: 100%;
        min-width: 0;
    }
    
    .audio-input-group select {
        font-size: 1rem;
        padding: 12px;
    }
    
    .level-meter {
        height: 25px;
        margin-top: 10px;
    }
    
    /* Recordings section - mobile layout */
    .recordings-section {
        padding: 0 15px 15px 15px;
        margin-bottom: 20px;
    }
    
    .recordings-section h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .recording-item {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
        text-align: center;
    }
    
    .recording-info {
        width: 100%;
        text-align: center;
    }
    
    .recording-name {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .recording-details {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
    
    .recording-controls {
        width: 100%;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 0;
    }
    
    .recording-controls .btn-delete {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
        order: 2;
    }
    
    .recording-controls .download-buttons {
        width: 100%;
        justify-content: center;
        order: 1;
    }
    
    .btn-download-format {
        flex: 1;
        min-width: 70px;
        padding: 8px 6px;
        font-size: 0.8rem;
    }
    
    /* Audio player - mobile layout */
    .audio-player {
        width: 100%;
        margin: 15px 0;
        height: 45px;
    }
    
    .custom-audio-player {
        padding: 12px;
        margin: 15px 0;
    }
    
    .audio-controls {
        gap: 8px;
        margin-bottom: 10px;
    }
    
    .play-pause-btn {
        width: 45px;
        height: 45px;
        font-size: 28px;
    }
    
    .time-display {
        font-size: 0.9rem;
        min-width: 90px;
    }
    
    .progress-container {
        height: 8px;
    }
    
    .volume-container {
        gap: 8px;
    }
    
    .volume-slider {
        width: 70px;
        height: 6px;
    }
    
    /* Settings section - mobile layout */
    .settings-section {
        padding: 15px;
    }
    
    .settings-section h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .setting-group select {
        padding: 12px;
        font-size: 1rem;
    }
    
    /* Notifications - mobile layout */
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .notification.show {
        transform: translateY(0);
    }
    
    .notification-container {
        right: 10px;
        left: 10px;
        top: 10px;
    }
}

/* Small mobile phones */
@media (max-width: 480px) {
    .main-container {
        padding: 0 5px;
    }
    
    .recorder-container {
        padding: 0 10px 10px 10px;
        border-radius: 6px;
    }
    
    h1 {
        font-size: 1.6rem;
        margin-bottom: 10px;
    }
    
    .privacy-notice {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .privacy-title {
        font-size: 0.95rem;
    }
    
    .privacy-description {
        font-size: 0.85rem;
    }
    
    .recording-section {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .btn {
        max-width: 280px;
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .recording-status {
        padding: 12px;
    }
    
    .recording-timer {
        font-size: 1.3rem;
    }
    
    .audio-input-group select {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .level-meter {
        height: 20px;
    }
    
    .recordings-section {
        padding: 0 10px 10px 10px;
    }
    
    .recording-item {
        padding: 12px;
    }
    
    .recording-name {
        font-size: 0.9rem;
    }
    
    .recording-details {
        font-size: 0.8rem;
    }
    
    .btn-download-format {
        min-width: 60px;
        padding: 6px 4px;
        font-size: 0.7rem;
    }
    
    .custom-audio-player {
        padding: 10px;
    }
    
    .audio-controls {
        gap: 6px;
    }
    
    .play-pause-btn {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .time-display {
        font-size: 0.8rem;
        min-width: 80px;
    }
    
    .volume-slider {
        width: 60px;
    }
    
    .settings-section {
        padding: 12px;
    }
    
    .setting-group select {
        padding: 10px;
        font-size: 0.9rem;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .main-container {
        padding: 0 3px;
    }
    
    .recorder-container {
        padding: 0 8px 8px 8px;
    }
    
    h1 {
        font-size: 1.4rem;
    }
    
    .privacy-notice {
        padding: 10px;
    }
    
    .privacy-title {
        font-size: 0.9rem;
    }
    
    .privacy-description {
        font-size: 0.8rem;
    }
    
    .recording-section {
        padding: 10px;
    }
    
    .btn {
        max-width: 260px;
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .recording-status {
        padding: 10px;
    }
    
    .recording-timer {
        font-size: 1.2rem;
    }
    
    .pulse-dot {
        width: 10px;
        height: 10px;
    }
    
    .recording-item {
        padding: 10px;
    }
    
    .btn-download-format {
        min-width: 50px;
        padding: 5px 3px;
        font-size: 0.65rem;
    }
    
    .download-buttons {
        gap: 4px;
    }
    
    .play-pause-btn {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    .time-display {
        font-size: 0.75rem;
        min-width: 70px;
    }
    
    .volume-slider {
        width: 50px;
        height: 4px;
    }
    
    .progress-container {
        height: 6px;
    }
}

/* Tablet portrait */
@media (min-width: 769px) and (max-width: 1024px) {
    .main-container {
        width: 100%;
        max-width: 700px;
    }
    
    .recorder-container {
        padding: 0 25px 25px 25px;
    }
    
    .record-controls {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .btn {
        width: auto;
        min-width: 120px;
        max-width: 200px;
    }
    
    .recording-status {
        flex-direction: row;
        text-align: left;
    }
    
    .audio-input-level-container {
        flex-direction: row;
        gap: 20px;
    }
    
    .recording-item {
        flex-direction: row;
        text-align: left;
    }
    
    .recording-controls {
        flex-direction: row;
        gap: 10px;
    }
    
    .settings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Keep desktop styles for larger screens */
@media (min-width: 1025px) {
    .main-container {
        width: 940px;
        margin: 20px auto;
        padding: 0 20px;
    }
    
    .recorder-container {
        padding: 0 30px 30px 30px;
    }
}

/* Ensure proper touch targets on mobile */
@media (max-width: 768px) {
    .btn,
    .btn-download-format,
    .play-pause-btn,
    select,
    input[type="range"] {
        min-height: 6px; /* Apple's recommended minimum touch target */
    }
    
    .pulse-dot {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .pulse-dot::before {
        content: '';
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: inherit;
    }
    
    .pulse-dot.recording::before {
        animation: pulseDotRecording 1s infinite;
    }
    
    .pulse-dot.paused::before {
        animation: pulseDotPaused 1.2s infinite;
    }
}

/* Improve conversion progress on mobile */
@media (max-width: 768px) {
    .conversion-progress {
        width: 90%;
        max-width: 300px;
        padding: 15px;
    }
    
    .conversion-progress .spinner {
        width: 30px;
        height: 30px;
        margin-bottom: 10px;
    }
    
    .conversion-progress p {
        font-size: 0.9rem;
    }
}

/* Keep all other existing styles unchanged... */

