* {
    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: 1200px;
    margin: 0 auto;
}

.section {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.hidden {
    display: none !important;
}

/* Auth Section */
#authSection h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 40px;
    font-size: 2.5em;
}

.auth-forms {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.form-container h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input[type="text"],
input[type="password"],
input[type="url"] {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: #667eea;
}

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

button:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

/* Messages */
.message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* App Section */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.header h1 {
    color: #667eea;
    font-size: 2em;
}

.user-info {
    display: flex;
    gap: 10px;
    align-items: center;
}

.user-info span {
    font-weight: 600;
    color: #333;
}

/* Upload Section */
.upload-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.upload-section h2 {
    color: #333;
    margin-bottom: 20px;
}

#uploadForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* File Input Wrapper */
.file-input-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Hide default file input */
#uploadForm input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Custom file input label */
.file-input-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    background: #007bff;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    min-height: 50px;
    width: 100%;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
}

.file-input-label:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.file-input-label:active {
    transform: translateY(0);
}

/* File name display */
.file-name {
    padding: 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* Upload button */
.upload-btn {
    padding: 15px 30px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 50px;
}

.upload-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

.upload-btn:active {
    transform: translateY(0);
}

.upload-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
}

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

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

/* Songs Section */
.songs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.songs-header h2 {
    color: #333;
}

.song-count {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-left: 10px;
}

.songs-list {
    display: grid;
    gap: 15px;
}

.song-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s;
}

.song-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.song-info {
    flex: 1;
}

.song-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.song-date {
    font-size: 14px;
    color: #6c757d;
}

.song-actions {
    display: flex;
    gap: 10px;
}

.song-actions button {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-download {
    background: #28a745;
}

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

.btn-rename {
    background: #ffc107;
    color: #333;
}

.btn-rename:hover {
    background: #e0a800;
}

.btn-delete {
    background: #dc3545;
}

.btn-delete:hover {
    background: #c82333;
}

.btn-url {
    background: #17a2b8;
}

.btn-url:hover {
    background: #138496;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-forms {
        grid-template-columns: 1fr;
    }
    
    .upload-section {
        padding: 20px;
    }
    
    .file-input-label {
        font-size: 18px;
        padding: 20px;
        min-height: 60px;
    }
    
    .upload-btn {
        font-size: 18px;
        padding: 20px;
        min-height: 60px;
    }
    
    .song-item {
        flex-direction: column;
        gap: 15px;
    }
    
    .song-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .song-actions button {
        flex: 1;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .user-info {
        flex-direction: column;
        width: 100%;
    }
    
    .user-info button {
        width: 100%;
    }
}
