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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #2d1810 0%, #3d2318 50%, #5d3a1a 100%);
    min-height: 100vh;
    color: #ffffff;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    gap: 30px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
    border-bottom: 3px solid #d4a574;
    padding-bottom: 20px;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, #d4a574 0%, #b8860b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    font-size: 1.3rem;
    opacity: 0.8;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.translation-section {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid #d4a574;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    position: relative;
}

.translation-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #d4a574;
}

.translation-section h2 {
    color: #d4a574;
    margin-bottom: 25px;
    font-size: 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    border-bottom: 2px solid #d4a574;
    padding-bottom: 10px;
}

.translation-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 25px;
    align-items: start;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.button-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.button-group .btn.primary {
    flex: 1;
}

.button-group .btn.secondary {
    width: 80px;
    height: auto;
    padding: 18px 12px;
    font-size: 1rem;
}

.input-group label {
    font-weight: 600;
    color: #d4a574;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid #d4a574;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

textarea:focus {
    outline: none;
    border-color: #d4a574;
    box-shadow: 0 0 0 4px rgba(212, 165, 116, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.btn {
    padding: 18px 36px;
    border: none;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn.primary {
    background: linear-gradient(135deg, #d4a574 0%, #b8860b 100%);
    color: white;
    box-shadow: 0 6px 12px rgba(212, 165, 116, 0.4);
    border: 2px solid #b8860b;
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(212, 165, 116, 0.6);
    background: linear-gradient(135deg, #e6b894 0%, #daa520 100%);
    border-color: #daa520;
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #d4a574;
    border: 2px solid #d4a574;
    width: 60px;
    height: 60px;
    padding: 0;
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn.secondary:hover {
    background: rgba(212, 165, 116, 0.2);
    border-color: #e6b894;
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(212, 165, 116, 0.4);
}

.swap-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 60px;
}

.voice-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.voice-group {
    text-align: center;
}

.voice-group h3 {
    color: #d4a574;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #d4a574;
    padding-bottom: 8px;
}

.recording-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.recording-buttons .btn {
    flex: 1;
    max-width: 220px;
    min-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
    padding: 16px 20px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn.recording {
    background: linear-gradient(135deg, #e6b894 0%, #daa520 100%) !important;
    animation: pulse 1.5s infinite;
}

.status {
    margin: 15px 0;
    padding: 10px;
    border-radius: 4px;
    font-weight: 500;
}

.status.recording {
    background: rgba(212, 165, 116, 0.2);
    color: #d4a574;
    animation: pulse 1.5s infinite;
    border: 1px solid #d4a574;
    border-radius: 4px;
}

.status.success {
    background: rgba(144, 238, 144, 0.2);
    color: #90ee90;
    border: 1px solid #90ee90;
    border-radius: 4px;
}

.transcription {
    background: rgba(255, 255, 255, 0.08);
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
    min-height: 60px;
    border: 2px dashed #d4a574;
    color: rgba(255, 255, 255, 0.8);
}

.result-container {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result {
    background: rgba(212, 165, 116, 0.1);
    padding: 15px;
    border-radius: 4px;
    min-height: 60px;
    border-left: 4px solid #d4a574;
    font-weight: 600;
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(212, 165, 116, 0.3);
}

.speak-result-btn {
    align-self: flex-start;
    width: auto;
    padding: 12px 20px;
    font-size: 0.9rem;
}

.reference-section {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid #d4a574;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    position: relative;
}

.reference-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #d4a574;
}

.reference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.morse-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid #d4a574;
    transition: all 0.2s ease;
}

.morse-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(212, 165, 116, 0.4);
    background: rgba(212, 165, 116, 0.15);
    border-color: #e6b894;
}

.morse-item .letter {
    font-size: 1.8rem;
    font-weight: 800;
    color: #d4a574;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(212, 165, 116, 0.3);
}

.morse-item .poopy-code {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 60px;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 300;
    letter-spacing: 0.5px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .translation-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .swap-btn {
        margin: 15px 0;
    }
    
    .voice-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .recording-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .recording-buttons .btn {
        max-width: 100%;
        min-width: 200px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .translation-section {
        padding: 20px;
    }
    
    .reference-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

/* Recording animation */
.recording .mic-icon {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
} 