/* --- START OF FILE styles.css --- */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #000;
    color: #fff;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
    position: relative;
    background-color: #000;
}

.screen {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    transition: opacity 0.5s ease;
    padding-top: calc(50vh - 200px);
    padding-bottom: 100px;
}

.screen.active {
    display: flex;
    opacity: 1;
}

.record-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    height: 400px;
    max-width: 400px;
}

@media (max-height: 600px) {
    .screen {
        padding-top: calc(50vh - 160px);
    }
    
    .record-button-container {
        height: 320px;
    }
    
    .record-button.white,
    .record-button.red {
        width: 160px;
        height: 160px;
    }
}

@media (max-height: 400px) {
    .screen {
        padding-top: calc(50vh - 120px);
    }
    
    .record-button-container {
        height: 240px;
    }
    
    .record-button.white,
    .record-button.red {
        width: 120px;
        height: 120px;
    }
    
    .control-button {
        width: 40px;
        height: 40px;
    }
    
    .control-button i {
        font-size: 16px;
    }
}

.record-button {
    /* Base size removed - specific sizes below */
    border-radius: 50%;
    border: none;
    outline: none;
    cursor: pointer;
    transition: transform 0.2s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.record-button:active {
    /* Keep scale consistent regardless of base size */
    transform: translate(-50%, -50%) scale(0.95);
}

/* Main screen white button */
.record-button.white {
    background-color: #fff;
    width: 200px;
    height: 200px;
    animation: glowPulse 3s ease-in-out infinite;
    filter: blur(10px);
}

/* Recording and Paused red button */
.record-button.red {
    background-color: #ff0000;
    width: 200px;
    height: 200px;
    animation: glowPulse 3s ease-in-out infinite;
    box-shadow: 0 0 50px rgba(255, 0, 0, 0.4);
    z-index: 2;
    filter: blur(10px); 
}

.bottom-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    animation: bottomGradient 3s ease-in-out infinite;
    z-index: 100;
}

.control-button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background-color: #fff;
    margin: 0 12px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
    animation: glowPulse 3s ease-in-out infinite;
}

.control-button:hover {
    transform: scale(1.05);
    background-color: #f0f0f0;
}

.control-button:active {
    transform: scale(0.95);
}

/* Font Awesome Icon Styling */
.control-button i {
    font-size: 20px;
    color: #000;
}

/* Icons */
.pause-icon, .play-icon, .restart-icon, .copy-icon, .retry-icon {
    width: 24px;
    height: 24px;
    background-color: #000;
    position: relative;
}

.pause-icon {
    display: flex;
    justify-content: center;
}

.pause-icon::before, .pause-icon::after {
    content: '';
    width: 4px;
    height: 24px;
    background-color: #000;
    position: absolute;
}

.pause-icon::before { left: 6px; }
.pause-icon::after { right: 6px; }

.play-icon {
    clip-path: polygon(0 0, 0 24px, 24px 12px);
    background-color: #000;
}

.restart-icon {
    border-radius: 50%;
    border: 2px solid #000;
    background-color: transparent;
    position: relative;
}

.restart-icon::before {
    content: '';
    position: absolute;
    top: 0;
    right: 8px;
    width: 8px;
    height: 8px;
    border-top: 2px solid #000;
    border-right: 2px solid #000;
    transform: rotate(-45deg);
}

.copy-icon {
    position: relative;
    background-color: transparent;
}

.copy-icon::before, .copy-icon::after {
    content: '';
    position: absolute;
    background-color: #000;
    border: 2px solid #000;
}

.copy-icon::before {
    width: 16px;
    height: 16px;
    top: 0;
    right: 0;
}

.copy-icon::after {
    width: 16px;
    height: 16px;
    bottom: 0;
    left: 0;
    background-color: transparent;
}

.retry-icon {
    border-radius: 50%;
    border: 2px solid #000;
    background-color: transparent;
    position: relative;
}

.retry-icon::before {
    content: '';
    position: absolute;
    top: 0;
    right: 8px;
    width: 8px;
    height: 8px;
    border-top: 2px solid #000;
    border-right: 2px solid #000;
    transform: rotate(45deg);
}

.retry-icon::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 4px;
    width: 12px;
    height: 12px;
    border: 2px solid #000;
    border-top: none;
    border-right: none;
    transform: rotate(45deg);
}

/* Override retry button specific styles */
#retry-button {
    background-color: #fff;
}

#retry-button:hover {
    background-color: #f0f0f0;
}

/* Wave Animation Container */
.wave-container {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

/* Canvas Styling */
canvas#visualizerCanvas, canvas#visualizerCanvasPaused {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    z-index: 1;
}

/* Transcription Screen Styles */
.transcription-container {
    width: 90%;
    max-width: 600px;
    height: 60%;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow: hidden;
    margin-top: 20px;
}

.text-container { width: 100%; height: 100%; overflow-y: auto; padding: 10px; }
.text-container.hidden { display: none; }
.transcription-text { font-size: 18px; line-height: 1.5; color: #fff; text-align: left; }
.transcription-text.error { color: #ff6b6b; }

/* Loading Spinner (Unchanged) */
.loading-container { display: flex; justify-content: center; align-items: center; height: 100%; width: 100%; }
.loading-spinner { width: 50px; height: 50px; border: 5px solid rgba(255, 255, 255, 0.3); border-radius: 50%; border-top-color: #fff; animation: spin 1s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Add keyframes for glow animation */
@keyframes glowPulse {
    0% {
        box-shadow: 0 0 30px rgba(255, 0, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 60px rgba(255, 0, 0, 0.6);
    }
    100% {
        box-shadow: 0 0 30px rgba(255, 0, 0, 0.4);
    }
}

@keyframes bottomGradient {
    0% {
        background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.8) 50%, transparent);
    }
    50% {
        background: linear-gradient(to top, rgba(0, 0, 0, 0.98), rgba(0, 0, 0, 0.85) 50%, transparent);
    }
    100% {
        background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.8) 50%, transparent);
    }
}

/* Add responsive adjustments for mobile */
@media (max-width: 480px) {
    .record-button-container {
        height: 400px;
        max-width: 400px;
    }

    .record-button.white,
    .record-button.red {
        width: 140px;
        height: 140px;
    }

    canvas#visualizerCanvas, canvas#visualizerCanvasPaused {
        width: 380px !important;
        height: 380px !important;
    }
}

/* --- END OF FILE styles.css --- */