* {
    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, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

h1 {
    color: white;
    text-align: center;
    font-size: 36px;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    color: rgba(255,255,255,0.9);
    text-align: center;
    margin-bottom: 30px;
    font-size: 16px;
}

.upload-section {
    background: #0f3460;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.upload-area {
    border: 3px dashed #2a4a7a;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    background: rgba(26, 26, 46, 0.5);
}

.upload-area:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.upload-area.drag-over {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.2);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.upload-area h2 {
    color: #e0e0e0;
    font-size: 20px;
    margin-bottom: 20px;
}

.upload-btn {
    padding: 15px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.upload-btn:active {
    transform: translateY(0);
}

.status {
    background: #0f3460;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.status.info {
    background: rgba(33, 150, 243, 0.15);
    color: #64b5f6;
    border-left: 4px solid #2196f3;
}

.status.success {
    background: rgba(76, 175, 80, 0.15);
    color: #81c784;
    border-left: 4px solid #4caf50;
}

.status.error {
    background: rgba(244, 67, 54, 0.15);
    color: #e57373;
    border-left: 4px solid #f44336;
}

.upload-queue {
    background: #0f3460;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.upload-queue h3 {
    color: #e0e0e0;
    margin-bottom: 15px;
    font-size: 18px;
}

.queue-item {
    padding: 15px;
    margin-bottom: 10px;
    background: rgba(26, 26, 46, 0.6);
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.queue-item.success {
    background: rgba(76, 175, 80, 0.15);
    border-color: rgba(76, 175, 80, 0.3);
}

.queue-item.pending {
    background: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.3);
}

.queue-item.error {
    background: rgba(244, 67, 54, 0.15);
    border-color: rgba(244, 67, 54, 0.3);
}

.queue-status {
    font-size: 20px;
    margin-top: 2px;
}

.queue-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.queue-text {
    font-size: 14px;
    color: #b0b0b0;
    font-weight: 500;
}

.progress-bar-container {
    width: 100%;
    height: 20px;
    background: rgba(26, 26, 46, 0.8);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-text {
    font-size: 12px;
    color: #9e9e9e;
    font-weight: 600;
}

.copy-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.copy-btn:active {
    transform: translateY(0);
}

.copy-btn.pending-btn {
    background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%);
    opacity: 0.7;
    cursor: help;
}

.copy-btn.pending-btn:hover {
    opacity: 0.85;
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.player-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.player-btn:hover {
    box-shadow: 0 3px 10px rgba(245, 87, 108, 0.3);
}

.download-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.download-btn:hover {
    box-shadow: 0 3px 10px rgba(79, 172, 254, 0.3);
}

.stats-section {
    background: #0f3460;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.stats-section h2 {
    color: #e0e0e0;
    margin-bottom: 20px;
    font-size: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    color: white;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

.repo-list h3 {
    color: #b0b0b0;
    margin-bottom: 15px;
    font-size: 18px;
}

.repo-item {
    background: rgba(26, 26, 46, 0.6);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.repo-name {
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 8px;
    font-size: 16px;
}

.repo-info {
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 14px;
    color: #9e9e9e;
}

.repo-progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(26, 26, 46, 0.8);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s;
}

.no-repos {
    text-align: center;
    color: #7a7a7a;
    padding: 20px;
    font-style: italic;
}

.hidden {
    display: none;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 28px;
    }

    .upload-section {
        padding: 20px;
    }

    .upload-area {
        padding: 40px 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .repo-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .repo-progress {
        width: 100%;
    }
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-icon {
    display: block;
}

/* Light Theme Variables */
body[data-theme="light"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body[data-theme="light"] .upload-section {
    background: white;
    border: none;
}

body[data-theme="light"] .upload-area {
    border-color: #ddd;
    background: transparent;
}

body[data-theme="light"] .upload-area:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

body[data-theme="light"] .upload-area.drag-over {
    background: #f0f3ff;
}

body[data-theme="light"] .upload-area h2 {
    color: #555;
}

body[data-theme="light"] .status {
    background: white;
    border: none;
}

body[data-theme="light"] .status.info {
    background: #e3f2fd;
    color: #1976d2;
}

body[data-theme="light"] .status.success {
    background: #e8f5e9;
    color: #2e7d32;
}

body[data-theme="light"] .status.error {
    background: #ffebee;
    color: #c62828;
}

body[data-theme="light"] .upload-queue {
    background: white;
    border: none;
}

body[data-theme="light"] .upload-queue h3 {
    color: #333;
}

body[data-theme="light"] .queue-item {
    background: #f5f5f5;
    border: none;
}

body[data-theme="light"] .queue-item.success {
    background: #e8f5e9;
}

body[data-theme="light"] .queue-item.error {
    background: #ffebee;
}

body[data-theme="light"] .queue-text {
    color: #555;
}

body[data-theme="light"] .progress-bar-container {
    background: #e0e0e0;
    border: none;
}

body[data-theme="light"] .progress-text {
    color: #666;
}

body[data-theme="light"] .stats-section {
    background: white;
    border: none;
}

body[data-theme="light"] .stats-section h2 {
    color: #333;
}

body[data-theme="light"] .repo-list h3 {
    color: #555;
}

body[data-theme="light"] .repo-item {
    background: #f8f9fa;
    border: none;
}

body[data-theme="light"] .repo-name {
    color: #333;
}

body[data-theme="light"] .repo-info {
    color: #666;
}

body[data-theme="light"] .progress-bar {
    background: #e0e0e0;
    border: none;
}

body[data-theme="light"] .no-repos {
    color: #999;
}

/* Converting state */
.queue-item.converting {
    background: rgba(255, 152, 0, 0.15);
    border-color: rgba(255, 152, 0, 0.3);
}

body[data-theme="light"] .queue-item.converting {
    background: #fff3e0;
    border: none;
}
