/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 25px;
}

.header h1 {
    font-family: 'Manrope', sans-serif;
    font-size: 4.8rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    animation: blurIn 0.8s ease-out;
}

@keyframes blurIn {
    0% {
        filter: blur(10px);
        opacity: 0;
        transform: scale(1.1);
    }
    100% {
        filter: blur(0px);
        opacity: 1;
        transform: scale(1);
    }
}

/* Central Recording Button */
.recording-center {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: blurIn 0.6s ease-out;
}

#statusText {
    display: block;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.8);
    font-weight: 400;
}

.status-container {
    position: relative;
    display: inline-block;
}

.status-dropdown {
    margin-left: 8px;
    font-size: 0.8rem;
    opacity: 0.7;
    transition: all 0.3s ease;
    cursor: pointer;
}

.status-dropdown:hover {
    opacity: 1;
    transform: translateY(2px);
}

.input-label-container {
    position: relative;
    display: inline-block;
}

.input-dropdown {
    margin-left: 8px;
    font-size: 0.8rem;
    opacity: 0.7;
    transition: all 0.3s ease;
    cursor: pointer;
    color: #495057;
}

.input-dropdown:hover {
    opacity: 1;
    transform: translateY(2px);
}

.output-label-container {
    position: relative;
    display: inline-block;
}

.target-dropdown {
    margin-left: 8px;
    font-size: 0.8rem;
    opacity: 0.7;
    transition: all 0.3s ease;
    cursor: pointer;
    color: #495057;
}

.target-dropdown:hover {
    opacity: 1;
    transform: translateY(2px);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    overflow: hidden;
    min-width: 160px;
    z-index: 1000;
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

/* Target language dropdown needs higher z-index since it's inside a card */
#targetLanguageDropdown {
    z-index: 1100 !important;
    overflow: visible !important;
    max-height: none !important;
}

.language-dropdown:not(.hidden) {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: all;
}

.dropdown-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option:hover {
    background: #f8f9fa;
}

.dropdown-option.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.dropdown-option .lang-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.record-button {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.record-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.4);
}

.record-button:active {
    transform: scale(0.95);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.6);
}

.record-button.recording {
    background: linear-gradient(135deg, #ff4757, #c44569);
    animation: pulse 1.5s infinite;
}

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

.recording-indicator {
    position: absolute;
    top: -10px;
    right: calc(50% - 45px);
}

.pulse {
    width: 12px;
    height: 12px;
    background: #ff4757;
    border-radius: 50%;
    animation: pulseIndicator 1s infinite;
}

@keyframes pulseIndicator {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
    100% { opacity: 1; transform: scale(1); }
}

/* Translation Cards */
.translation-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
    animation: blurIn 0.6s ease-out;
}

.card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

/* Special case for card with target language dropdown */
.card:nth-child(2) {
    overflow: visible;
    /* Ensure corners stay rounded even with visible overflow */
    border-radius: 16px;
}

/* Remove duplicate - this is handled above */

.card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-radius: 16px 16px 0 0;
}

.card-header span {
    font-weight: 600;
    font-size: 0.9rem;
    color: #495057;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #495057;
    font-size: 0.85rem;
}

.icon-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

.card textarea {
    width: 100%;
    border: none;
    padding: 20px;
    font-size: 1rem;
    font-family: inherit;
    resize: none;
    min-height: 100px;
    background: transparent;
    color: #333;
    border-radius: 0 0 16px 16px;
}

.card textarea:focus {
    outline: none;
}

.card textarea::placeholder {
    color: #adb5bd;
}

/* Vertical Tone Selector */
.tone-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: white;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    align-items: stretch;
    width: 220px;
    align-self: flex-start;
    animation: blurIn 0.6s ease-out;
}

.tone-btn {
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #495057;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: left;
}

.tone-btn:hover {
    background: #f8f9fa;
    color: #333;
}

.tone-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Wave Animation */
.wave-text {
    color: #666;
    font-family: monospace;
    font-size: 1.1rem;
    opacity: 0.8;
}

/* Hidden Elements */
.hidden {
    display: none !important;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    text-align: center;
    color: white;
}

.loading-spinner i {
    font-size: 2rem;
    margin-bottom: 15px;
    display: block;
}

.loading-spinner p {
    font-size: 1rem;
    opacity: 0.9;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .container {
        max-width: 100%;
    }
    
    .header h1 {
        font-size: 4.2rem;
    }
    
    .record-button {
        width: 70px;
        height: 70px;
        font-size: 1.5rem;
    }
    
    .tone-selector {
        gap: 6px;
        padding: 10px;
    }
    
    .tone-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .card-header {
        padding: 12px 16px;
    }
    
    .card textarea {
        padding: 16px;
        min-height: 80px;
    }
}

@media (max-width: 480px) {
    .tone-selector {
        gap: 4px;
        padding: 8px;
    }
    
    .tone-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .translation-cards {
        gap: 15px;
    }
} 
