:root {
    --bg-color: #0a0510;
    --card-bg: #1a0b2e;
    --primary-color: #ff6b00; /* Orange */
    --secondary-color: #9d00ff; /* Deep Purple */
    --accent-color: #ffd700; /* Gold */
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: linear-gradient(135deg, #130024 0%, #2a0845 100%);
    padding: 3rem 1rem 2rem;
    text-align: center;
    border-bottom: 4px solid var(--primary-color);
    box-shadow: 0 4px 20px rgba(255, 107, 0, 0.2);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 30px rgba(255, 107, 0, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
    font-style: italic;
}

.controls {
    margin-bottom: 2rem;
}

#searchInput {
    width: 100%;
    max-width: 400px;
    padding: 12px 20px;
    border-radius: 30px;
    border: 2px solid var(--secondary-color);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.4);
}

#categoryNav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.cat-btn {
    background-color: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.cat-btn:hover {
    background-color: rgba(157, 0, 255, 0.2);
    transform: translateY(-2px);
}

.cat-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #000;
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.5);
}

main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem;
    width: 100%;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.2rem;
}

.card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 1.2rem;
    border: 1px solid rgba(157, 0, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(157, 0, 255, 0.3);
    border-color: var(--primary-color);
}

.card-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-artist {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--accent-color);
    margin-bottom: 0.2rem;
    line-height: 1.1;
}

.card-album {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    flex-grow: 1;
}

.card-start {
    background-color: rgba(255, 107, 0, 0.1);
    border-left: 3px solid var(--primary-color);
    padding: 8px 12px;
    border-radius: 0 8px 8px 0;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.card-start strong {
    color: var(--primary-color);
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.play-btn {
    background-color: var(--primary-color);
    color: #000;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s ease;
}

.play-btn:hover {
    background-color: var(--accent-color);
    transform: scale(1.05);
}

.embed-container {
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.embed-container iframe {
    border-radius: 8px;
    display: block;
}

footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-family: var(--font-heading);
    color: var(--text-muted);
}

/* No results message */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Album entries within a card */
.album-entry {
    padding: 0.6rem 0;
}

.album-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.3rem;
    gap: 0.5rem;
}

.album-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.album-header .card-category {
    margin-bottom: 0;
}

.album-divider {
    border: none;
    border-top: 1px solid rgba(157, 0, 255, 0.2);
    margin: 0.8rem 0;
}

/* Comment section */
.comment-section {
    margin-top: 0.8rem;
}

.comment-toggle-btn {
    background: transparent;
    border: 1px solid rgba(157, 0, 255, 0.4);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.78rem;
    transition: all 0.2s ease;
}

.comment-toggle-btn:hover {
    border-color: var(--secondary-color);
    color: var(--text-main);
}

.comment-area {
    margin-top: 0.7rem;
}

.comment {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.82rem;
    margin-right: 0.5rem;
}

.comment-time {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.comment-text {
    margin-top: 0.3rem;
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.4;
}

.no-comments {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.comment-form {
    margin-top: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.comment-form input,
.comment-form textarea {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(157, 0, 255, 0.3);
    color: var(--text-main);
    padding: 6px 10px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    width: 100%;
}

.comment-form textarea {
    min-height: 60px;
    resize: vertical;
}

.comment-form button {
    background: var(--secondary-color);
    color: #fff;
    border: none;
    padding: 5px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    align-self: flex-start;
    transition: opacity 0.2s;
}

.comment-form button:hover { opacity: 0.8; }

@media (max-width: 768px) {
    header {
        padding: 2rem 1rem;
    }

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