* {
    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;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 10px;
    font-size: 2rem;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

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

input[type="text"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

.format-selection {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    justify-content: center;
}

.format-selection label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.format-selection label:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.format-selection input[type="radio"] {
    margin-right: 8px;
}

.format-selection input[type="radio"]:checked + span {
    font-weight: bold;
    color: #667eea;
}

.quality-selection {
    margin-bottom: 25px;
}

.quality-selection label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.quality-selection select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: border-color 0.3s;
    background: white;
}

.quality-selection select:focus {
    outline: none;
    border-color: #667eea;
}

button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.status, .result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.status {
    background: #e3f2fd;
    color: #1976d2;
    border-left: 4px solid #1976d2;
}

.result {
    background: #e8f5e9;
    color: #388e3c;
    border-left: 4px solid #388e3c;
}

.result a {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background: #4caf50;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}

.result a:hover {
    background: #45a049;
}

.download-stats {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
}

.auto-delete-notice {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
    font-style: italic;
}

.error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

.hidden {
    display: none;
}

.info {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 10px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 600px) {
    .container {
        padding: 25px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .format-selection {
        flex-direction: column;
    }
}
