/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #e8d5b7;
    min-height: 100vh;
}
/* Main Container */
.archives-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 40px;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-title {
    font-family: 'Cinzel', serif;
    font-size: 48px;
    color: #d4af37;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

.page-subtitle {
    font-size: 18px;
    color: rgba(232, 213, 183, 0.8);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Search Section */
.search-section {
    margin-bottom: 50px;
}

.search-box {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    gap: 15px;
}

.search-input {
    flex: 1;
    background: rgba(26, 26, 26, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #e8d5b7;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #d4af37;
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.search-btn {
    background: linear-gradient(135deg, #d4af37, #c9a745);
    color: #0a0a0a;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

/* Results Section */
.results-section {
    margin-top: 40px;
}

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

.results-header h2 {
    font-family: 'Cinzel', serif;
    font-size: 32px;
    color: #d4af37;
    margin-bottom: 10px;
}

.archives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    align-items: stretch;
}

.archive-card {
    background: rgba(20, 12, 8, 0.82);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
}

.archive-card:hover {
    transform: translateY(-6px);
    border-color: rgba(212, 175, 55, 0.55);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.archive-card-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}

.archive-card-content {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.archive-card-title {
    font-family: 'Cinzel', serif;
    font-size: 24px;
    color: #d4af37;
    line-height: 1.2;
}

.archive-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    color: rgba(232, 213, 183, 0.8);
    font-size: 14px;
}

.archive-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: auto;
}

.archive-action-btn {
    border: 1px solid rgba(212, 175, 55, 0.3);
    background: rgba(0, 0, 0, 0.28);
    color: #e8d5b7;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.archive-action-btn:hover {
    border-color: rgba(212, 175, 55, 0.7);
    color: #d4af37;
    background: rgba(212, 175, 55, 0.1);
}

.archive-action-btn.audio-btn {
    grid-column: 1 / -1;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: rgba(232, 213, 183, 0.8);
}

.audio-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.audio-modal.active {
    display: flex;
}
.audio-modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 35px;
    border-radius: 25px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6);
    position: relative;
    animation: slideUp 0.4s ease;
    color: white;
}

/* Close Button */
.audio-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.audio-close-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg);
}

.audio-close-btn i {
    font-size: 18px;
}

/* Audio Icon */
.audio-icon {
    text-align: center;
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.95;
    color: white;
}

.audio-icon i {
    color: white;
}

/* Title */
.audio-title {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    color: white;
}

/* Progress Container */
.audio-progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.audio-time {
    font-size: 14px;
    font-weight: 600;
    min-width: 48px;
    text-align: center;
    color: white;
}

.audio-progress-bar {
    flex: 1;
    height: 6px;
    border-radius: 10px;
    outline: none;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.audio-progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.audio-progress-bar::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* ========================================
   PLAYBACK CONTROLS - VISIBLE BUTTONS
   ======================================== */

.audio-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin-bottom: 30px;
}

/* Side Control Buttons (Rewind/Forward) */
.audio-control-btn {
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.4);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    font-size: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.audio-control-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.audio-control-btn:active {
    transform: scale(0.95);
}

.audio-control-btn i {
    font-size: 20px;
    color: white;
}

/* Main Play/Pause Button */
.audio-play-btn {
    background: white;
    border: none;
    width: 75px;
    height: 75px;
    border-radius: 50%;
    cursor: pointer;
    color: #667eea;
    font-size: 32px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    background: #f8f8f8;
}

.audio-play-btn:active {
    transform: scale(0.98);
}

.audio-play-btn i {
    font-size: 32px;
    color: #667eea;
    margin-left: 3px; /* Align play icon better */
}

.audio-play-btn i.fa-pause {
    margin-left: 0; /* No offset for pause icon */
}

/* Volume Container */
.audio-volume-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 0 10px;
}

.audio-volume-container i {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
}

.audio-volume-slider {
    flex: 1;
    height: 5px;
    border-radius: 10px;
    outline: none;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.audio-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.audio-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Language Selector */
.audio-language-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    padding: 0 10px;
}

.audio-language-selector i {
    font-size: 18px;
    color: white;
}

.audio-language-selector label {
    font-weight: 500;
    color: white;
    font-size: 14px;
}

.audio-language-dropdown {
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.audio-language-dropdown:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
}

.audio-language-dropdown option {
    background: #667eea;
    color: white;
    padding: 10px;
}

/* Info Text */
.audio-modal-content p {
    text-align: center;
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    margin-top: 20px;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .audio-modal-content {
        padding: 30px 25px;
        max-width: 90%;
    }
    
    .audio-controls {
        gap: 20px;
    }
    
    .audio-control-btn {
        width: 50px;
        height: 50px;
    }
    
    .audio-play-btn {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
    
    .audio-title {
        font-size: 20px;
    }
}


/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


/* Archive View Modal */
.archive-view-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.archive-view-modal.active {
    display: block;
}

.archive-view-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    max-width: 900px;
    margin: 40px auto;
    border-radius: 20px;
    padding: 50px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    position: relative;
}

.view-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: #e8d5b7;
    font-size: 32px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-close:hover {
    background: rgba(212, 175, 55, 0.3);
    color: #d4af37;
    transform: rotate(90deg);
}

.archive-view-title {
    font-family: 'Cinzel', serif;
    font-size: 36px;
    color: #d4af37;
    margin-bottom: 30px;
    text-align: center;
}

.archive-view-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 30px;
}

.archive-view-text {
    color: rgba(232, 213, 183, 0.9);
    font-size: 16px;
    line-height: 1.8;
    text-align: justify;
}

.archive-view-section {
    margin-top: 30px;
}

.archive-view-section h3 {
    font-family: 'Cinzel', serif;
    color: #d4af37;
    font-size: 24px;
    margin-bottom: 15px;
}

.archive-view-section p {
    color: rgba(232, 213, 183, 0.9);
    font-size: 16px;
    line-height: 1.8;
    text-align: justify;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .archives-container {
        padding: 30px 20px;
    }

    .page-title {
        font-size: 32px;
    }

    .search-box {
        flex-direction: column;
    }

    .archives-grid {
        grid-template-columns: 1fr;
    }

    .archive-card-actions {
        grid-template-columns: 1fr;
    }

    .archive-action-btn.audio-btn {
        grid-column: auto;
    }

    .audio-modal-content {
        width: 95%;
        padding: 30px 20px;
    }

    .archive-view-content {
        padding: 30px 20px;
        margin: 20px;
    }
}
