:root {
    --primary-color: #5E60CE;
    --primary-hover: #4A4C99;
    --secondary-color: #64DFDF;
    --danger-color: #FF6B6B;
    --success-color: #4ECDC4;
    --dark-bg: #1A1B36;
    --light-bg: #F8F9FA;
    --card-bg: #FFFFFF;
    --text-primary: #212529;
    --text-secondary: #6C757D;
    --border-color: #E9ECEF;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

* {
    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, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

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

header {
    text-align: center;
    padding: 40px 0;
    color: white;
    position: relative;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 20px;
}

.language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
}

#languageSelect {
    padding: 8px 16px;
    border: 2px solid white;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 14px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

#languageSelect:hover {
    background: rgba(255,255,255,0.3);
}

#languageSelect option {
    background: var(--dark-bg);
    color: white;
}

main {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
}

.recorder-section {
    margin-bottom: 40px;
}

.preview-container {
    position: relative;
    background: var(--dark-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 30px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#preview {
    width: 100%;
    height: auto;
    display: none;
    border-radius: var(--radius-md);
}

.recording-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 0, 0, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    display: none;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    animation: pulse 2s infinite;
}

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

.rec-dot {
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

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

.controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-group {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    padding: 20px;
    background: var(--light-bg);
    border-radius: var(--radius-md);
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-item label {
    font-weight: 500;
    color: var(--text-secondary);
}

.setting-item select {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.setting-item select:hover {
    border-color: var(--primary-color);
}

.setting-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

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

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #4AC9C9;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #FF5252;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.recordings-list {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid var(--border-color);
}

.recordings-list h2 {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.8rem;
}

.recording-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--light-bg);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.recording-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.recording-info {
    flex: 1;
}

.recording-date {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.recording-size {
    font-size: 14px;
    color: var(--text-secondary);
}

.recording-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 6px 16px;
    font-size: 14px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.features {
    margin-top: 60px;
}

.features h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 40px;
    color: var(--text-primary);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    text-align: center;
    padding: 30px 20px;
    background: var(--light-bg);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background: white;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

footer {
    text-align: center;
    padding: 30px 0;
    color: white;
    opacity: 0.9;
}

.notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--success-color);
    color: white;
    padding: 15px 25px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    font-weight: 500;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .language-selector {
        position: static;
        margin-top: 20px;
    }
    
    main {
        padding: 20px;
    }
    
    .settings-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .recording-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .recording-actions {
        width: 100%;
    }
    
    .btn-small {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    main {
        padding: 15px;
    }
    
    .preview-container {
        min-height: 250px;
    }
}