/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700&family=Nunito:wght@400;600&display=swap');

:root {
    --bg-color: #1a1010;
    --card-bg: #2d1819;
    --primary-color: #c94040;
    --secondary-color: #d19a4e;
    --text-color: #fcebeb;
    --text-muted: #b59595;
    --border-color: #5c2c2d;
    --glow-color: rgba(201, 64, 64, 0.4);
    --gold-glow: rgba(209, 154, 78, 0.5);
    
    --font-heading: 'Cinzel', serif;
    --font-body: 'Nunito', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background-image: radial-gradient(circle at 15% 50%, rgba(201, 64, 64, 0.05), transparent 25%),
                      radial-gradient(circle at 85% 30%, rgba(209, 154, 78, 0.05), transparent 25%);
}

/* Background floating elements (butterflies) */
.fx-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.butterfly {
    position: absolute;
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23c94040"><path d="M12,15.5C8.83,16 6,18.5 6,22C6,23.1 6.9,24 8,24C9.5,24 10.83,23.3 11.55,22.25C11.85,21.8 12.15,21.8 12.45,22.25C13.17,23.3 14.5,24 16,24C17.1,24 18,23.1 18,22C18,18.5 15.17,16 12,15.5M12,14.5C15.17,14 18,11.5 18,8C18,6.9 17.1,6 16,6C14.5,6 13.17,6.7 12.45,7.75C12.15,8.2 11.85,8.2 11.55,7.75C10.83,6.7 9.5,6 8,6C6.9,6 6,6.9 6,8C6,11.5 8.83,14 12,14.5Z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6;
    animation: flutter 10s infinite linear, sway 3s infinite ease-in-out alternate;
    filter: drop-shadow(0 0 5px var(--primary-color));
}

@keyframes flutter {
    0% { transform: translateY(110vh) rotate(0deg) scale(0.8); }
    100% { transform: translateY(-10vh) rotate(360deg) scale(1.2); }
}

@keyframes sway {
    0% { margin-left: -50px; }
    100% { margin-left: 50px; }
}

/* Header & Nav */
header {
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border-bottom: 2px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    background-color: rgba(26, 16, 16, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--secondary-color);
    text-shadow: 0 0 10px var(--gold-glow);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    display: inline-block;
    white-space: nowrap;
}

nav ul li a:hover, nav ul li a.active {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
    background-color: rgba(209, 154, 78, 0.1);
    box-shadow: 0 0 10px var(--gold-glow) inset;
}

/* Mobile Navigation Button */
.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--secondary-color);
    font-size: 1.5rem;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-toggle:hover {
    background-color: rgba(209, 154, 78, 0.1);
    box-shadow: 0 0 10px var(--gold-glow) inset;
}

/* Main Container */
main {
    padding: 3rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Section Headings */
h1, h2, h3 {
    font-family: var(--font-heading);
}

.section-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 2.2rem;
    text-shadow: 0 0 15px var(--glow-color);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 20%;
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
}

/* Grid Layout */
.media-grid {
    column-count: 3;
    column-gap: 2rem;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    break-inside: avoid;
    margin-bottom: 2rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--glow-color);
    border-color: var(--primary-color);
}

.card-image-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    background-color: rgba(0,0,0,0.5);
    display: block;
}

.card-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.card:hover .card-image-wrapper img {
    transform: scale(1.05);
}

/* Audio specific */
.audio-icon {
    font-size: 4rem;
    color: var(--secondary-color);
    filter: drop-shadow(0 0 10px var(--gold-glow));
}

.card-content {
    padding: 1.2rem;
}

.card-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-color);
}

.card-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
}

/* Controls */
.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    flex: 1;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 10px rgba(201, 64, 64, 0.3);
}

.btn-primary:hover {
    background-color: #e64a4a;
    box-shadow: 0 0 15px var(--glow-color);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn-outline:hover {
    background-color: rgba(209, 154, 78, 0.1);
    box-shadow: 0 0 10px var(--gold-glow) inset;
}

.btn-danger {
    background-color: transparent;
    border: 1px solid #ff4d4d;
    color: #ff4d4d;
}

.btn-danger:hover {
    background-color: rgba(255, 77, 77, 0.1);
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.3) inset;
}

/* Audio Player styling */
.custom-audio-player {
    width: 100%;
    margin-top: 10px;
    height: 35px;
    outline: none;
}

.custom-audio-player::-webkit-media-controls-panel {
    background-color: rgba(255,255,255,0.1);
}

.custom-audio-player::-webkit-media-controls-current-time-display,
.custom-audio-player::-webkit-media-controls-time-remaining-display {
    color: var(--text-color);
}

/* Upload Area */
.upload-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.drop-zone {
    width: 100%;
    height: 200px;
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-muted);
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    background-color: rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--primary-color);
    background-color: rgba(201, 64, 64, 0.05);
    color: var(--secondary-color);
    box-shadow: 0 0 15px inset var(--glow-color);
}

.drop-zone__input {
    display: none;
}

.upload-preview {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.preview-item {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    background: #000;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item.audio-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1010;
    color: var(--secondary-color);
    font-size: 2rem;
}

.progress-bar-container {
    width: 100%;
    height: 10px;
    background-color: #1a1010;
    border-radius: 5px;
    margin-top: 15px;
    overflow: hidden;
    display: none;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

/* Toast Notification */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 15px 25px;
    border-radius: 8px;
    margin-top: 10px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    transform: translateX(120%);
    animation: slideIn 0.3s forwards;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.success { border-left-color: #4CAF50; }
.toast.error { border-left-color: #f44336; }

@keyframes slideIn {
    to { transform: translateX(0); }
}

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

/* Image Modal */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.9); 
    backdrop-filter: blur(5px);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid var(--border-color);
    box-shadow: 0 0 30px var(--glow-color);
    border-radius: 4px;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

/* Search Bar */
.search-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.search-input {
    width: 100%;
    max-width: 500px;
    padding: 12px 20px;
    border-radius: 25px;
    border: 1px solid var(--border-color);
    background-color: rgba(0,0,0,0.3);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--glow-color), inset 0 2px 5px rgba(0,0,0,0.5);
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }
    
    .logo {
        flex: 1;
    }
    
    .nav-toggle {
        display: block;
    }
    
    nav {
        display: none;
        width: 100%;
        margin-top: 15px;
        animation: fadeIn 0.3s ease;
    }
    
    nav.show {
        display: block;
    }

    nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
    }
    
    nav ul li a {
        display: block;
        text-align: center;
    }
    
    .media-grid {
        column-count: 2;
    }
}

@media (max-width: 500px) {
    .media-grid {
        column-count: 1;
    }
}
