@import "details.css";
@import "examples.css";

:root {
    --primary-color: #D4AF37;
    /* Gold */
    --secondary-color: #800000;
    /* Deep Red */
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #f5f5f5;
    --text-muted: #aaaaaa;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'DM Sans', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    margin-bottom: 0.5em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 70vh;
    padding: 100px 0 60px;
    background-image: url('https://images.unsplash.com/photo-1615414047026-802692414b79?q=80&w=2069&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 800px;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 0.2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero .subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

/* Search Bar */
.search-bar {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 10px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.search-bar:focus-within {
    transform: scale(1.02);
    box-shadow: 0 12px 40px 0 rgba(212, 175, 55, 0.2);
    border-color: var(--primary-color);
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    padding: 10px 20px;
    outline: none;
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-bar button {
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: var(--bg-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-bar button:hover {
    background: #e5bd43;
}

/* Results Section */
#results-section {
    padding: 4rem 0;
    min-height: 400px;
}

#results-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

#results-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
    margin: 10px auto 0;
}

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

/* Play Card */
.play-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.play-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.play-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.play-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.play-genre {
    color: var(--primary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.play-title {
    font-size: 1.5rem;
    margin: 0 0 1rem;
    color: #fff;
    line-height: 1.25;
}

.play-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.play-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    color: #ddd;
    font-size: 0.9rem;
}

.play-rating i {
    color: var(--primary-color);
    margin-right: 5px;
}

.btn-book {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 6px;
    text-align: center;
    font-weight: 700;
    transition: background 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.btn-book:hover {
    background: #a00000;
}

/* Footer */
footer {
    background: #000;
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid #333;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        min-height: 80vh;
        padding: 80px 0 40px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero .subtitle {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .search-bar {
        flex-direction: column;
        border-radius: 12px;
    }

    .search-bar button {
        width: 100%;
        border-radius: 8px;
        margin-top: 10px;
    }

    .btn-explore-container {
        margin-top: 1.5rem;
    }

    .btn-explore {
        font-size: 1rem;
        padding: 10px 20px;
    }
}

.btn-explore-container {
    margin-top: 2.5rem;
}

.btn-explore {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(45deg, #FE2C55, #25F4EE);
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(254, 44, 85, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-explore:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(37, 244, 238, 0.5);
    color: white;
}

.btn-explore i {
    font-size: 1.35rem;
}

/* AI Answer Box */
.ai-answer {
    background-color: #f0fdf4;
    border-left: 5px solid #22c55e;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.5s ease-out;
}

.ai-answer p {
    margin: 0;
    color: #1a202c;
    font-size: 1.1rem;
    line-height: 1.6;
}

.ai-answer strong {
    color: #166534;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Unified Recommendation UI */
.recommendation-container {
    background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%);
    border: 1px solid var(--primary-color);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 3rem;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.15);
    animation: fadeIn 0.5s ease-out;
}

.ai-context {
    flex: 1;
    font-size: 1.1rem;
    line-height: 1.8;
}

.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(212, 175, 55, 0.2);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.featured-card {
    flex: 0 0 350px;
    /* Fixed width for the card */
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(212, 175, 55, 0.3);
}

.featured-card:hover {
    transform: scale(1.05);
}

.alternatives-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
    border-bottom: 1px solid #333;
    padding-bottom: 1rem;
    margin-top: 3rem;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .recommendation-container {
        flex-direction: column;
    }

    .featured-card {
        width: 100%;
        flex: none;
    }
}

/* Markdown Styling within AI Context */
.ai-content p {
    margin-bottom: 1em;
}

.ai-content ul,
.ai-content ol {
    margin-bottom: 1em;
    padding-left: 1.5em;
}

.ai-content li {
    margin-bottom: 0.5em;
}

.ai-content strong {
    color: var(--primary-color);
}

.ai-content em {
    font-style: italic;
    color: #fff;
}

.special-tag {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    border: none;
    font-weight: bold;
}

.special-tag:hover {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.4);
}

/* Loader */
.loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(8px);
    padding: 2rem 3rem;
    border-radius: 50px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.loader::before,
.loader::after,
.loader span {
    content: '';
    display: block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: loaderPulse 1.2s ease-in-out infinite;
}

.loader::before {
    animation-delay: 0s;
}

.loader span {
    animation-delay: 0.2s;
}

.loader::after {
    animation-delay: 0.4s;
}

@keyframes loaderPulse {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }

    40% {
        transform: scale(1.2);
        opacity: 1;
        box-shadow: 0 0 12px rgba(212, 175, 55, 0.6);
    }
}

/* ─── Header mini (page détail & catégorie) ─────── */
.header-mini {
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #2a2a2a;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-mini-inner {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
}

.cat-nav-mini {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cat-pill {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    background: #2a2a2a;
    color: var(--text-muted);
    border: 1px solid #333;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cat-pill:hover {
    background: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
}

.cat-pill.active {
    background: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
}

/* ─── Breadcrumb ───────────────────────────────── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--primary-color);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ─── Category Header ──────────────────────────── */
.category-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 2rem 0 1rem;
}

.category-emoji {
    font-size: 3.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.category-header h1 {
    font-size: 2.5rem;
    margin: 0 0 0.25rem;
    color: var(--primary-color);
}

.category-desc {
    color: var(--text-muted);
    margin: 0;
    font-size: 1rem;
}

.results-count {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.results-count strong {
    color: var(--text-color);
}

/* ─── Empty state ──────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-muted);
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* ─── Category grid on index ───────────────────── */
.categories-section {
    padding: 3rem 0;
    border-top: 1px solid #222;
}

.categories-section h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

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

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem;
    background: var(--card-bg);
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    color: var(--text-color);
}

.category-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.15);
    color: var(--primary-color);
}

.category-card .cat-emoji {
    font-size: 2.2rem;
}

.category-card .cat-label {
    font-weight: 700;
    font-size: 0.95rem;
}

.price-free {
    color: #2ecc71;
    font-weight: bold;
}