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

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

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

h1 {
    text-align: center;
    color: #333;
    padding: 30px 0;
    background: #f8f9fa;
    margin-bottom: 30px;
    font-size: 2.2em;
    font-weight: 300;
}

.format-selection {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 0 30px;
}

.format-selection label {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.format-select {
    padding: 8px 16px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
}

.format-select:hover {
    border-color: #007bff;
}

.format-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

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

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

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

.btn.start {
    background: #28a745;
    color: white;
}

.btn.start:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-2px);
}

.btn.stop {
    background: #dc3545;
    color: white;
}

.btn.stop:hover:not(:disabled) {
    background: #c82333;
    transform: translateY(-2px);
}

.btn.download {
    background: #007bff;
    color: white;
}

.btn.download:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-2px);
}

.status {
    text-align: center;
    margin-bottom: 30px;
    padding: 0 30px;
}

#statusText {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
}

.timer {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    font-family: 'Courier New', monospace;
}

.timer.recording {
    color: #dc3545;
    animation: pulse 1s infinite;
}

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

.preview-container {
    margin: 0 30px 30px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#preview {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
}

.info {
    background: #f8f9fa;
    padding: 20px 30px;
    border-top: 1px solid #e9ecef;
}

.info p {
    margin-bottom: 10px;
    color: #666;
    line-height: 1.5;
}

.info p:last-child {
    margin-bottom: 0;
}

.recording-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #dc3545;
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    display: none;
    z-index: 1000;
    animation: pulse 1s infinite;
}

.recording-indicator.active {
    display: block;
}