/* ==========================================================================
   ALVIN THEME - High Performance MP3Juice Dark UI
   Inspired by qrco2.fr
   ========================================================================== */

:root {
    --bg-dark: #12161f;
    --bg-card: #1c2230;
    --bg-card-hover: #242c3d;
    --bg-header: #0d1117;
    --primary: #00d26a;
    --primary-hover: #00b85c;
    --secondary: #3b82f6;
    --secondary-hover: #2563eb;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --text-heading: #ffffff;
    --border-color: #2e384d;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
    --radius: 12px;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

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

/* --------------------------------------------------------------------------
   HEADER & NAVIGATION
   -------------------------------------------------------------------------- */
#header {
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

#header .nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

#header .nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

#header .nav-links a:hover {
    color: var(--text-heading);
}

#language-toggle {
    background: #1e293b;
    color: var(--text-main);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}

#languages-dropdown {
    display: none;
    position: absolute;
    top: 50px;
    right: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 8px 0;
    z-index: 101;
}

#languages-dropdown.show {
    display: flex;
    flex-direction: column;
}

#languages-dropdown a {
    padding: 8px 20px;
    color: var(--text-main);
    font-size: 0.9rem;
}

#languages-dropdown a:hover {
    background: var(--bg-card-hover);
    color: var(--primary);
}

/* --------------------------------------------------------------------------
   BRANDING & LOGO
   -------------------------------------------------------------------------- */
#logo {
    text-align: center;
    padding: 40px 20px 20px;
}

#logo h1 {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #00d26a 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
}

#logo p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* --------------------------------------------------------------------------
   SEARCH FORM
   -------------------------------------------------------------------------- */
#search-container {
    max-width: 720px;
    margin: 0 auto 40px;
    padding: 0 20px;
    width: 100%;
}

#search-form {
    display: flex;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 6px;
    box-shadow: var(--shadow);
    transition: border-color 0.2s ease;
}

#search-form:focus-within {
    border-color: var(--primary);
}

#query {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-heading);
    font-size: 1.05rem;
    padding: 12px 24px;
}

#query::placeholder {
    color: var(--text-muted);
}

#submit {
    background: linear-gradient(135deg, var(--primary) 0%, #00b85c 100%);
    color: #0d1117;
    border: none;
    outline: none;
    font-size: 1rem;
    font-weight: 700;
    padding: 12px 32px;
    border-radius: 40px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 210, 106, 0.4);
}

/* --------------------------------------------------------------------------
   RESULTS SECTION
   -------------------------------------------------------------------------- */
#results {
    max-width: 960px;
    margin: 0 auto 50px;
    padding: 0 20px;
    width: 100%;
}

.results-header {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 24px;
    border-left: 4px solid var(--primary);
    padding-left: 12px;
}

.media-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.media-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    gap: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.media-card:hover {
    transform: translateY(-2px);
    border-color: #3b4252;
}

.thumb-wrapper {
    position: relative;
    width: 180px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #0d1117;
}

.thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.badge-hd {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--primary);
    color: #0d1117;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.media-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.media-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 6px;
    line-height: 1.4;
}

.media-title a {
    color: var(--text-heading);
}

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

.media-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.media-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

/* Watch / Stream Button -> Download Page */
.btn-watch {
    background: var(--primary);
    color: #0d1117;
}

.btn-watch:hover {
    background: var(--primary-hover);
    color: #0d1117;
    box-shadow: 0 4px 12px rgba(0, 210, 106, 0.3);
}

/* Read More Button -> Search Page */
.btn-readmore {
    background: #242c3d;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-readmore:hover {
    background: #2e384d;
    color: #fff;
}

/* --------------------------------------------------------------------------
   SEO CONTENT SECTION
   -------------------------------------------------------------------------- */
#text {
    max-width: 960px;
    margin: 0 auto 60px;
    padding: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    width: 100%;
}

#text h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

#text h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 24px 0 12px;
}

#text p {
    margin-bottom: 14px;
    color: var(--text-main);
    font-size: 0.98rem;
}

#text ol, #text ul {
    margin: 14px 0 20px 24px;
}

#text li {
    margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   DOWNLOAD / DETAILS PAGE SPECIFIC
   -------------------------------------------------------------------------- */
.download-hero {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
}

.download-hero img {
    max-width: 320px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.download-title {
    font-size: 1.8rem;
    color: var(--text-heading);
    margin-bottom: 12px;
}

.download-btn-group {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-download-primary {
    background: linear-gradient(135deg, #00d26a 0%, #00b85c 100%);
    color: #0d1117;
    font-size: 1.1rem;
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 800;
}

.btn-download-secondary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    font-size: 1.1rem;
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 800;
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
#footer {
    margin-top: auto;
    background: var(--bg-header);
    border-top: 1px solid var(--border-color);
    padding: 24px 20px;
    text-align: center;
}

#footer .footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

#footer .footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

#footer .footer-links a:hover {
    color: var(--primary);
}

#footer .copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   RESPONSIVE DESIGN
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    #logo h1 {
        font-size: 2.2rem;
    }

    .media-card {
        flex-direction: column;
    }

    .thumb-wrapper {
        width: 100%;
        height: 200px;
    }

    #search-form {
        flex-direction: column;
        border-radius: 20px;
        padding: 10px;
    }

    #submit {
        border-radius: 12px;
        width: 100%;
        margin-top: 8px;
    }

    .action-buttons {
        width: 100%;
    }

    .btn {
        flex: 1;
        justify-content: center;
    }
}
