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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

header p {
    font-size: 1.1rem;
    color: #7f8c8d;
}

.auth-section {
    text-align: center;
    margin-bottom: 30px;
}

.btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: #e74c3c;
}

.btn-success {
    background: #27ae60;
}

.btn-secondary {
    background: #95a5a6;
}

.auth-status {
    margin-top: 15px;
    font-weight: 500;
}

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

.input-section h2 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.instructions {
    margin-bottom: 20px;
    color: #7f8c8d;
    font-style: italic;
}

#song-input {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 20px;
    transition: border-color 0.3s ease;
}

#song-input:focus {
    outline: none;
    border-color: #3498db;
}

.playlist-options {
    margin: 20px 0;
    padding: 20px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    background-color: #f9f9f9;
}

.playlist-options h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.playlist-option {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.playlist-option input[type="radio"] {
    margin-right: 8px;
    transform: scale(1.2);
}

.playlist-option label {
    font-weight: 500;
    color: #555;
    margin-right: 10px;
    min-width: 200px;
}

.playlist-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.playlist-input:focus {
    outline: none;
    border-color: #3498db;
}

.playlist-input:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.playlist-select {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    font-size: 14px;
    background-color: white;
    transition: border-color 0.3s ease;
}

.playlist-select:focus {
    outline: none;
    border-color: #3498db;
}

.playlist-select:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.progress-section {
    text-align: center;
    margin-bottom: 30px;
}

.progress-section h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    width: 0%;
    transition: width 0.3s ease;
}

#progress-text {
    color: #7f8c8d;
    font-weight: 500;
}

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

.results-section h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.results-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
}

.results-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ecf0f1;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.result-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.result-item:last-child {
    border-bottom: none;
}

.result-status {
    margin-right: 10px;
    font-size: 1.2rem;
}

.result-text {
    flex: 1;
}

.success {
    color: #27ae60;
}

.error {
    color: #e74c3c;
}

.warning {
    color: #f39c12;
}

footer {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Mobile layout: stack fields below labels for all mobile devices */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 15px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 14px 20px;
        font-size: 1rem;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        display: block;
    }
    
    .playlist-options {
        padding: 15px;
    }
    
    .playlist-option {
        margin: 12px 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 2px !important;
    }
    
    .playlist-option input[type="radio"] {
        margin-right: 8px !important;
        margin-bottom: 0 !important;
        transform: scale(1.3) !important;
        align-self: flex-start !important;
        order: 1;
    }
    
    .playlist-option label {
        font-size: 0.95rem !important;
        margin-right: 0 !important;
        margin-bottom: 2px !important;
        min-width: auto !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        order: 2;
    }
    
    .playlist-input,
    .playlist-select {
        width: 100% !important;
        padding: 12px !important;
        font-size: 16px !important; /* Prevents zoom on iOS */
        margin-top: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        flex: none !important;
        order: 3;
        display: block !important;
    }
    
    #song-input {
        min-height: 120px;
        padding: 12px;
        font-size: 16px;
    }
}