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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 50%, #90caf9 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #1a237e;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(33, 150, 243, 0.2);
    max-width: 900px;
    width: 100%;
    padding: 30px;
    backdrop-filter: blur(10px);
}

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

header h1 {
    font-size: 2.5rem;
    color: #1565c0;
    margin-bottom: 10px;
    font-weight: 600;
}

.subtitle {
    color: #42a5f5;
    font-size: 1.1rem;
    font-weight: 300;
}

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

.video-container {
    position: relative;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

#preview,
#recordedVideo {
    width: 100%;
    height: auto;
    display: block;
    min-height: 400px;
    object-fit: cover;
}

#recordedVideo {
    background: #000;
}

.recording-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(244, 67, 54, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
    animation: pulse 2s infinite;
}

.recording-dot {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: blink 1s infinite;
}

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

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

.controls-section {
    margin-bottom: 20px;
}

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

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.btn:active:not(:disabled) {
    transform: translateY(0);
}

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

.btn-primary {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
}

.btn-success {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #64b5f6 0%, #42a5f5 100%);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #42a5f5 0%, #2196f3 100%);
}

.btn-icon {
    font-size: 1.2rem;
}

.info-section {
    display: flex;
    justify-content: space-around;
    background: rgba(33, 150, 243, 0.1);
    padding: 20px;
    border-radius: 10px;
    flex-wrap: wrap;
    gap: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.info-label {
    font-size: 0.9rem;
    color: #64b5f6;
    font-weight: 500;
}

.info-value {
    font-size: 1.3rem;
    color: #1565c0;
    font-weight: 600;
}

.error-message {
    background: rgba(244, 67, 54, 0.1);
    color: #c62828;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #f44336;
    margin-top: 20px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.retry-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.retry-btn:hover {
    background: #d32f2f;
}

.hidden {
    display: none !important;
}

footer {
    text-align: center;
    margin-top: 20px;
    color: #64b5f6;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    header h1 {
        font-size: 2rem;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    #preview {
        min-height: 300px;
    }
}

