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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.title-en {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.title-ja {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.9;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
}

.input-section {
    margin-bottom: 30px;
}

.input-method {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.file-input-label {
    display: inline-block;
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
}

.file-input-label:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

#fileInput {
    display: none;
}

.mic-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mic-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.mic-button.active {
    background: #ff4444;
    border-color: #ff4444;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0);
    }
}

.visualizer-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

canvas {
    width: 100%;
    height: 300px;
    border-radius: 10px;
    margin-bottom: 10px;
    background: rgba(0, 0, 0, 0.2);
}

canvas:last-child {
    margin-bottom: 0;
}

.controls {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

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

.control-group label {
    font-weight: 500;
}

select, input[type="range"] {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    padding: 5px 10px;
    color: #ffffff;
    font-size: 0.95rem;
}

select option {
    background: #2a5298;
}

input[type="range"] {
    width: 150px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

#smoothingValue {
    min-width: 35px;
    text-align: center;
}

.audio-controls {
    text-align: center;
    margin-bottom: 30px;
}

#audioPlayer {
    width: 100%;
    max-width: 500px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.1);
}

footer {
    text-align: center;
}

.language-selector select {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 8px 20px;
    color: #ffffff;
    font-size: 0.95rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .title-ja {
        font-size: 1rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .control-group {
        flex-direction: column;
        text-align: center;
    }
    
    canvas {
        height: 200px;
    }
}