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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #1a1a1a;
    padding: 20px;
    overflow: auto;
    min-height: 100vh;
    position: relative;
}

#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.thumbnail {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s;
}

.thumbnail:hover {
    transform: scale(1.02);
}

.thumbnail img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 250px;
    height: 250px;
    background: rgba(0,0,0,0.4);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.thumbnail:hover .play-overlay {
    opacity: 1;
}

.play-button {
    width: 50px;
    height: 50px;
    background: #2a2a2a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-button::after {
    content: '';
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 20px solid #1a1a1a;
    margin-left: 5px;
}

.title {
    margin-top: 8px;
    text-align: center;
    color: #e1e1e1;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #2a2a2a;
    padding: 20px;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    color: #e1e1e1;
}

.close-button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #888;
}

.modal-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

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

.play-pause {
    background: #4a90e2;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-bar {
    flex-grow: 1;
    height: 4px;
    background: #404040;
    border-radius: 2px;
    cursor: pointer;
}

.progress {
    width: 30%;
    height: 100%;
    background: #4a90e2;
    border-radius: 2px;
}

.time-display {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 14px;
}
