* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #06152c 0%, #1a2a4a 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.logo-container {
    margin-bottom: 20px;
}

.logo {
    height: 80px;
    width: auto;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    color: #f3b909;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed #ddd;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: #fafafa;
}

.upload-area:hover {
    border-color: #f3b909;
    background: #fff9e6;
}

.upload-area.dragover {
    border-color: #f3b909;
    background: #fff5d6;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.upload-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.upload-content p {
    color: #666;
    margin-bottom: 25px;
}

.upload-btn {
    background: linear-gradient(135deg, #f3b909 0%, #e6a800 100%);
    color: #06152c;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(243, 185, 9, 0.3);
    font-weight: 600;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 185, 9, 0.4);
}

.video-section {
    margin-bottom: 30px;
}

.video-section h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3rem;
}

#videoPlayer {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.extract-btn, .reset-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.extract-btn {
    background: linear-gradient(135deg, #f3b909 0%, #e6a800 100%);
    color: #06152c;
    box-shadow: 0 4px 15px rgba(243, 185, 9, 0.3);
    font-weight: 600;
}

.extract-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 185, 9, 0.4);
}

.reset-btn {
    background: #f44336;
    color: white;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

.result-section {
    text-align: center;
}

.result-section h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3rem;
}

.frame-container {
    margin-bottom: 25px;
    display: inline-block;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

#frameCanvas {
    max-width: 100%;
    height: auto;
    display: block;
}

.download-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.download-btn, .new-video-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.download-btn {
    background: linear-gradient(135deg, #f3b909 0%, #e6a800 100%);
    color: #06152c;
    box-shadow: 0 4px 15px rgba(243, 185, 9, 0.3);
    font-weight: 600;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 185, 9, 0.4);
}

.new-video-btn {
    background: #06152c;
    color: #f3b909;
    box-shadow: 0 4px 15px rgba(6, 21, 44, 0.3);
    border: 2px solid #f3b909;
}

.new-video-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 21, 44, 0.4);
    background: #f3b909;
    color: #06152c;
}

.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #f3b909;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: #666;
    font-size: 1.1rem;
}

footer {
    text-align: center;
    color: white;
    opacity: 0.8;
}

/* Navigation styles */
.nav-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.nav-link {
    color: #f3b909;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(243, 185, 9, 0.1);
    border-color: #f3b909;
}

.nav-link.active {
    background: #f3b909;
    color: #06152c;
    border-color: #f3b909;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    main {
        padding: 25px;
    }
    
    .logo {
        height: 60px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .upload-area {
        padding: 40px 15px;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .controls, .download-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .extract-btn, .reset-btn, .download-btn, .new-video-btn {
        width: 100%;
        max-width: 250px;
    }
}

/* Aspect ratio controls */
.aspect-ratio-controls {
    margin-bottom: 30px;
    text-align: center;
}

.aspect-ratio-controls h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1rem;
}

/* Frame selection controls */
.frame-selection {
    margin-bottom: 30px;
    text-align: center;
}

.frame-selection h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1rem;
}

.frame-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.frame-controls input[type="range"] {
    cursor: pointer;
}

.frame-controls span {
    font-weight: 500;
    color: #333;
    min-width: 100px;
}

.ratio-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.ratio-btn {
    padding: 12px 25px;
    border: 2px solid #ddd;
    border-radius: 25px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.ratio-btn:hover {
    border-color: #f3b909;
    background: #fff9e6;
}

.ratio-btn.active {
    background: #f3b909;
    color: #06152c;
    border-color: #f3b909;
    box-shadow: 0 4px 15px rgba(243, 185, 9, 0.3);
}

/* Responsive design for aspect ratio controls */
@media (max-width: 768px) {
    .ratio-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .ratio-btn {
        width: 100%;
        max-width: 250px;
    }
}

/* Error states */
.error {
    border-color: #f44336 !important;
    background: #ffebee !important;
}

.success {
    border-color: #4CAF50 !important;
    background: #e8f5e8 !important;
} 