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

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

/* Layout Components */
.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.header-main h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
    text-align: left;
}

.header-main p {
    font-size: 1.1em;
    opacity: 0.9;
    text-align: left;
}

.header-auth {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.user-info {
    font-size: 0.9em;
    opacity: 0.8;
    font-weight: 500;
}

.logout-btn {
    padding: 8px 16px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .header-main h1 {
        text-align: center;
        font-size: 2em;
    }
    
    .header-main p {
        text-align: center;
    }
    
    .header-auth {
        align-items: center;
        margin-top: 15px;
    }
}

.content {
    padding: 40px;
}

/* Keyboard Help Section */
.keyboard-help {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    font-size: 0.9em;
    text-align: left;
}

.keyboard-help h3 {
    margin-bottom: 10px;
    font-size: 1.1em;
}

.keyboard-shortcuts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.shortcut {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.key {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-weight: bold;
}

/* Status and Loading States */
.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
    color: #666;
}

.status {
    text-align: center;
    margin: 20px 0;
    font-size: 1.1em;
    font-weight: 600;
    min-height: 1.5em;
}

.status .error {
    color: #e74c3c;
}

.status .success {
    color: #27ae60;
}

.status .info {
    color: #3498db;
}

/* Track Information Section */
.track-info {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
}

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

.meta-item {
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.9em;
}

.meta-label {
    font-weight: bold;
    color: #666;
    display: block;
}

.meta-value {
    color: #333;
}

.transcript {
    background: white;
    padding: 20px;
    border-radius: 12px;
    font-size: 1.1em;
    line-height: 1.6;
    border-left: 4px solid #4facfe;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Audio Section */
.audio-section {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.waveform-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#waveform {
    width: 100%;
    height: 150px;
    cursor: pointer;
}

.audio-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

/* Button Styles */
.control-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
}

.play-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.play-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Evaluation Section */
.evaluation-section {
    margin-bottom: 30px;
}

.evaluation-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.eval-btn {
    padding: 20px;
    border: none;
    border-radius: 15px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
}

.eval-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.eval-btn.active {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    opacity: 0.8;
}

.eval-btn .shortcut-key {
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(255,255,255,0.8);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    font-family: monospace;
    font-weight: bold;
    color: #333;
}

.errors-btn {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #333;
}

.pronunciation-btn {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
}

.noise-btn {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #333;
}

.good-btn {
    background: linear-gradient(135deg, #c3f0ca 0%, #faf0e6 100%);
    color: #333;
}

/* Navigation */
.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

.nav-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
}

.prev-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.next-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.nav-btn .shortcut-key {
    position: absolute;
    top: 5px;
    right: 10px;
    background: rgba(255,255,255,0.2);
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.7em;
    font-family: monospace;
}

/* Progress Section */
.progress-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.progress-text {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
}

.progress-bar {
    width: 200px;
    height: 8px;
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Statistics Section */
.stats {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-top: 30px;
    text-align: center;
}

.stats h3 {
    margin-bottom: 15px;
    font-size: 1.3em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-item {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 10px;
}

.stat-number {
    font-size: 1.8em;
    font-weight: bold;
    display: block;
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.9;
}

/* Auto-save Indicator */
.auto-save-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #27ae60;
    color: white;
    padding: 10px 15px;
    border-radius: 25px;
    font-size: 0.9em;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.auto-save-indicator.show {
    opacity: 1;
}

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

.eval-btn.just-clicked {
    animation: pulse 0.3s ease;
}
