/* Discover Page Styles */
.discover-hero {
    position: relative;
    width: 100%;
    margin-bottom: 32px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 400px;
    background: var(--surface);
    display: flex;
    align-items: flex-end;
}

.discover-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    z-index: 1;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.discover-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.4) 60%, rgba(0, 0, 0, 0.1) 100%);
    z-index: 2;
}

.discover-hero-content {
    position: relative;
    z-index: 3;
    padding: 40px;
    max-width: 800px;
}

.discover-hero-title {
    font-size: 42px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.2;
}

.discover-hero-desc {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 24px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.discover-hero-actions {
    display: flex;
    gap: 16px;
}

/* Surprise Me Button */
.surprise-me-container {
    display: flex;
    justify-content: center;
    margin: 48px 0;
}

.btn-surprise {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-hover) 100%);
    color: white;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 18px;
    padding: 16px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 6px 20px rgba(var(--accent-primary-rgb, 99, 102, 241), 0.5);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.btn-surprise::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.btn-surprise:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(var(--accent-primary-rgb, 99, 102, 241), 0.7);
}

.btn-surprise:hover::before {
    left: 100%;
}

.btn-surprise:active {
    transform: translateY(1px);
}

.surprise-icon {
    animation: sparkle 2.5s infinite linear;
}

@keyframes sparkle {
    0% {
        transform: scale(1) rotate(0deg);
    }

    30% {
        transform: scale(1.1) rotate(15deg);
    }

    70% {
        transform: scale(1.1) rotate(-15deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* Category Sections */
.discover-categories {
    display: flex;
    flex-direction: column;
    gap: 48px;
    margin-bottom: 40px;
}

.discover-section-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.discover-section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.discover-section-title svg {
    color: var(--accent-primary);
}

.discover-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

@media (max-width: 768px) {
    .discover-hero {
        height: 320px;
        margin-bottom: 24px;
    }

    .discover-hero-content {
        padding: 24px;
    }

    .discover-hero-title {
        font-size: 28px;
    }

    .btn-surprise {
        width: 100%;
        justify-content: center;
        padding: 16px 24px;
    }

    .discover-categories {
        gap: 32px;
    }
}

/* Surprise Me Panel Styles */
.surprise-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.surprise-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.surprise-panel {
    background: var(--surface);
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.surprise-panel-overlay.active .surprise-panel {
    transform: scale(1);
}

.surprise-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.surprise-panel-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.surprise-panel-title svg {
    color: var(--accent-primary);
}

.surprise-panel-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.surprise-panel-close:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    transform: rotate(90deg);
}

.surprise-panel-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.surprise-panel-desc {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.genre-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.genre-tag {
    background: var(--background);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.genre-tag:hover {
    background: rgba(var(--accent-primary-rgb, 99, 102, 241), 0.1);
    color: var(--text-primary);
    border-color: rgba(var(--accent-primary-rgb, 99, 102, 241), 0.3);
}

.genre-tag.selected {
    background: rgba(var(--accent-primary-rgb, 99, 102, 241), 0.2);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(var(--accent-primary-rgb, 99, 102, 241), 0.2);
}

.genre-tag-icon {
    display: none;
    width: 14px;
    height: 14px;
}

.genre-tag.selected .genre-tag-icon {
    display: block;
}

.surprise-panel-footer {
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 480px) {
    .surprise-panel {
        width: 95%;
    }

    .genre-tag {
        font-size: 13px;
        padding: 6px 12px;
    }
}