* {
    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, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

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

header h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    color: #666;
    font-size: 1.1em;
}

.auth-section, .upload-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.auth-section h2, .upload-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.auth-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.auth-form input {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.auth-form button {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s;
}

.auth-form button:hover {
    background: #5568d3;
}

#auth-status {
    margin-top: 15px;
}

#auth-status .success {
    color: #28a745;
    font-weight: 600;
}

#auth-status .error {
    color: #dc3545;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 6px;
    background: white;
    cursor: pointer;
}

.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    background: white;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.9em;
}

#upload-btn {
    width: 100%;
    padding: 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

#upload-btn:hover:not(:disabled) {
    background: #5568d3;
}

#upload-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s;
    animation: pulse 2s infinite;
}

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

#progress-text {
    text-align: center;
    color: #666;
    font-weight: 600;
}

.result-info {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 20px;
    margin-top: 20px;
}

.result-info h3 {
    color: #155724;
    margin-bottom: 15px;
}

.video-link {
    display: block;
    word-break: break-all;
    color: #667eea;
    text-decoration: none;
    margin: 10px 0;
    padding: 10px;
    background: white;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.video-link:hover {
    text-decoration: underline;
}

.copy-btn {
    padding: 10px 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 10px;
}

.copy-btn:hover {
    background: #218838;
}

.error {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 15px;
    margin-top: 20px;
}

#error-message {
    color: #721c24;
    margin-top: 10px;
}

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

    header h1 {
        font-size: 2em;
    }

    .auth-form {
        flex-direction: column;
    }

    .auth-form input {
        width: 100%;
    }
}

#progress-container h3 {
    color: #333;
    margin-bottom: 15px;
}

#progress-percent {
    text-align: center;
    font-size: 1.2em;
    font-weight: 600;
    color: #667eea;
    margin-top: 10px;
}
