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

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

h1 {
    color: #333;
}

section {
    margin-bottom: 40px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
}

h2 {
    color: #484BB4;
    margin-bottom: 20px;
}

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

label {
    display: inline-block;
    margin-right: 10px;
    font-weight: bold;
}

input, select {
    padding: 8px;
    margin-right: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    padding: 8px 16px;
    background-color: #484BB4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #3a3d8f;
}

#job-status, #progression-result, #search-results, #add-song-result {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 4px;
    min-height: 50px;
}

/* Tab Styles */
.tab-nav {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.tab-btn.active {
    color: #484BB4;
    border-bottom-color: #484BB4;
}

.tab-btn:hover {
    background: #f8f9fa;
}

.tab-content {
    display: none;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
}

.tab-content.active {
    display: block;
}

/* Song Tiles */
.song-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.song-tile {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.song-thumbnail {
    margin-bottom: 10px;
}

.song-thumbnail img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

.no-image {
    width: 100%;
    height: 150px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    border-radius: 4px;
    font-size: 14px;
}

.song-title {
    color: #484BB4;
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: bold;
}

.song-title a {
    color: #484BB4;
    text-decoration: none;
}

.song-title a:hover {
    text-decoration: underline;
}

.song-language, .song-sequence {
    margin: 4px 0;
    color: #666;
    font-size: 14px;
}

/* Category Reference Table */
.category-reference {
    margin-top: 30px;
}

.category-reference h3 {
    color: #484BB4;
    margin-bottom: 15px;
}

.category-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-table th {
    background: #484BB4;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: bold;
}

.category-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
    line-height: 1.5;
    font-size: 14px;
}

.category-table tr:last-child td {
    border-bottom: none;
}

.category-table tr:nth-child(even) {
    background: #f9f9f9;
}

.category-table th:nth-child(1),
.category-table td:nth-child(1) {
    width: 20%;
}

.category-table th:nth-child(2),
.category-table td:nth-child(2) {
    width: 50%;
}

.category-table th:nth-child(3),
.category-table td:nth-child(3) {
    width: 30%;
}

/* Progression Styles */
.progression-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.progression-grid {
    display: grid;
    gap: 15px;
}

.category-section {
    border-left: 4px solid #6B46C1;
}

.category-section h4 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.songs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.song-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

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

/* Job Management Styles */
.job-status-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.job-item {
    transition: transform 0.2s;
}

.job-item:hover {
    transform: translateX(5px);
}

.progress-bar {
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Status Colors */
.status-success { color: #28a745; }
.status-warning { color: #ffc107; }
.status-error { color: #dc3545; }
.status-info { color: #17a2b8; }

/* Date validation styles */
.date-error {
    margin: 5px 0;
    padding: 8px;
    border-radius: 4px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

input[type="date"] {
    transition: border-color 0.3s;
}

input[type="date"]:invalid,
input[type="date"][style*="border-color: #dc3545"] {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

input[type="date"]:valid,
input[type="date"][style*="border-color: #28a745"] {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Quick select buttons */
.quick-select-btn {
    background: #6B46C1;
    color: white;
    border: none;
    padding: 8px 12px;
    margin: 5px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
}

.quick-select-btn:hover {
    background: #553C9A;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .tab-nav {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 120px;
    }
    
    .song-tiles {
        grid-template-columns: 1fr;
    }
    
    .category-table {
        font-size: 12px;
    }
    
    .category-table th,
    .category-table td {
        padding: 8px;
    }
    
    .song-card {
        flex-direction: column;
        text-align: center;
    }
    
    .song-card .song-thumbnail {
        margin: 0 0 10px 0;
    }
}
