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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f7f7f7;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    opacity: 0.9;
    font-size: 1.1em;
}

.search-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.search-section.expanded {
    background: #f0f4ff;
}

.search-header {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
    padding: 12px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.search-box:focus {
    outline: none;
    border-color: #667eea;
}

.info-button {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.info-button:hover {
    background: #764ba2;
    transform: rotate(90deg);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

.filters {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    min-width: 150px;
    background: white;
}

.info-panel {
    margin-top: 20px;
    padding: 0;
    background: white;
    border-radius: 8px;
    display: none;
    animation: slideDown 0.3s ease;
    overflow: hidden;
}

.search-section.expanded .info-panel {
    display: block;
}

.info-content {
    padding: 25px;
    background: linear-gradient(135deg, #f5f7ff 0%, #ffffff 100%);
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.info-content h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.info-content h3 {
    color: #667eea;
    margin: 20px 0 10px 0;
    font-size: 1.2em;
}

.info-content p {
    line-height: 1.8;
    color: #444;
    margin-bottom: 15px;
}

.info-content ul {
    margin: 10px 0 20px 25px;
    line-height: 1.8;
    color: #444;
}

.info-content li {
    margin-bottom: 8px;
}

.info-content .highlight {
    background: #e8edff;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
    border-left: 4px solid #667eea;
}

.info-content .composer-quote {
    font-style: italic;
    color: #555;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    margin: 15px 0;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stats {
    margin: 15px 0;
    color: #666;
    font-size: 14px;
}

.record-header {
	padding: 10px 20px;
	margin-bottom: 5px;
	font-weight: bold;
	color: #667eea;
	text-transform: uppercase;
	font-size: 0.8em;
	letter-spacing: 0.5px;
	border-bottom: 2px solid #e0e0e0;
}

.header-item {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.records-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.record-item {
    background: white;
    border-radius: 8px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.record-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-left-color: #667eea;
}

.record-item.expanded {
    background: #f0f4ff;
    border-left-color: #667eea;
}

.record-preview {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1.5fr 1.5fr 1fr;
    gap: 15px;
    align-items: center;
}

.preview-field {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-label {
    display: none;
    font-weight: bold;
    color: #666;
    font-size: 12px;
    margin-bottom: 4px;
}

.title-field {
    font-weight: 600;
    color: #333;
}

.choir-field, .category-field {
    color: #555;
}

.text-field, .melody-field {
    color: #666;
    font-size: 0.95em;
}

.has-mp3 {
    color: #28a745;
    font-size: 20px;
    margin-left: 10px;
}

.has-pdf {
    color: #28a745;
    font-size: 20px;
    margin-left: 5px;
}

.record-detail {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    display: none;
    animation: slideDown 0.3s ease;
}

.record-item.expanded .record-detail {
    display: block;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.detail-item {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.detail-label {
    font-weight: bold;
    color: #667eea;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.detail-value {
    color: #333;
    line-height: 1.5;
}

.verses-box {
    grid-column: 1 / -1;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    max-height: 350px;
    overflow-y: auto;
    font-family: 'Georgia', serif;
    line-height: 1.8;
}

.comments-box {
    grid-column: 1 / -1;
    background: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #ffc107;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-pdf {
    background: #667eea;
    color: white;
}

.btn-pdf:hover {
    background: #764ba2;
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.loading {
    text-align: center;
    padding: 60px;
    font-size: 18px;
    color: #666;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.audio-player-container {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    animation: slideDown 0.3s ease;
}

.audio-player {
     width: 100%;
    margin-bottom: 10px;
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-mp3 {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
        
.btn-mp3:hover {
    background: #764ba2;
    transform: translateY(-2px);
}

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

/* Mobile responsive */
@media (max-width: 768px) {
    .record-preview {
        grid-template-columns: 1fr;
        gap: 8px;
    }
            
    .preview-label {
        display: block;
    }
            
    .preview-field {
        white-space: normal;
    }
            
    .filters {
        flex-direction: column;
    }
            
    .filter-select {
        width: 100%;
    }

    .search-header {
        flex-direction: column;
        align-items: stretch;
    }

    .info-button {
        align-self: flex-end;
    }

	.record-header {
		display: none;
	}
}
