/* ============================================
   AC Media Library — Base Layout
   ============================================ */

:root {
    /* Primary: raspberry */
    --md-sys-color-primary: #9c224a;
    --md-sys-color-on-primary: #ffffff;
    --md-sys-color-primary-container: #ffd9e2;
    --md-sys-color-on-primary-container: #3e001d;

    /* Secondary: deep purple */
    --md-sys-color-secondary: #521365;
    --md-sys-color-on-secondary: #ffffff;
    --md-sys-color-secondary-container: #f3daff;
    --md-sys-color-on-secondary-container: #2f0040;

    /* Tertiary: indigo (end stop of the brand gradient) */
    --md-sys-color-tertiary: #310d71;
    --md-sys-color-on-tertiary: #ffffff;

    /* Error: unchanged */
    --md-sys-color-error: #ba1a1a;
    --md-sys-color-on-error: #ffffff;
    --md-sys-color-error-container: #ffdad6;
    --md-sys-color-on-error-container: #410002;

    /* Neutrals */
    --md-sys-color-background: #ffffff;
    --md-sys-color-on-background: #1d1d1b;
    --md-sys-color-surface: #ffffff;
    --md-sys-color-on-surface: #1d1d1b;
    --md-sys-color-surface-variant: #e9e9e9;
    --md-sys-color-on-surface-variant: #313131;
    --md-sys-color-outline: #757575;
    --md-sys-color-outline-variant: #e0e0e0;
    --md-sys-color-shadow: #000000;

    /* Inverse (dark snackbars, tooltips, etc.) */
    --md-sys-color-inverse-surface: #313131;
    --md-sys-color-inverse-on-surface: #e9e9e9;
    --md-sys-color-inverse-primary: #f96f98;

    /* Brand gradient, for use with `background:` only */
    --md-brand-gradient: linear-gradient(40deg, #9c224a 0%, #310d71 100%);

    --md-elevation-level1: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --md-elevation-level2: 0 3px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.04);
    --md-elevation-level3: 0 10px 20px rgba(0, 0, 0, 0.08), 0 3px 6px rgba(0, 0, 0, 0.04);
    --md-elevation-level4: 0 14px 28px rgba(0, 0, 0, 0.1), 0 5px 10px rgba(0, 0, 0, 0.05);
    --md-sys-shape-corner-small: 8px;
    --md-sys-shape-corner-medium: 12px;
    --md-sys-shape-corner-large: 16px;
    --md-sys-shape-corner-extra-large: 20px;
    --md-sys-motion-duration: 0.2s;
}

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

body {
    font-family:
        'Inter',
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    background: var(--md-sys-color-background);
    color: var(--md-sys-color-on-background);
    line-height: 1.5;
}

/* ============ APP BAR ============ */

.app-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #521365;
    color: var(--md-sys-color-on-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.app-bar-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

.app-bar-icon {
    height: 48px;
    display: flex;
    padding: 4px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.app-bar-icon img {
    height: 100%;
    width: auto;
}

.app-bar-title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.app-bar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-bar-actions .btn-text {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.app-bar-actions .btn-text:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* ============ LANGUAGE SWITCHER ============ */

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 3px;
}

.lang-btn {
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.lang-btn.active {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* ============ LAYOUT ============ */

.layout {
    display: flex;
    min-height: calc(100vh - 64px);
    margin-top: 64px;
}

/* ============ NAVIGATION RAIL ============ */

.navigation-rail {
    width: 88px;
    background: var(--md-sys-color-surface);
    border-right: 1px solid var(--md-sys-color-outline-variant);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 4px;
    gap: 4px;
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    z-index: 50;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 0;
    width: 80px;
    border: none;
    background: transparent;
    color: var(--md-sys-color-on-surface-variant);
    cursor: pointer;
    border-radius: var(--md-sys-shape-corner-large);
    transition: all var(--md-sys-motion-duration);
    font-family: inherit;
    position: relative;
}

.nav-item:hover {
    background: var(--md-sys-color-surface-variant);
}

.nav-item.active {
    color: var(--md-sys-color-primary);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 32px;
    background: var(--md-sys-color-primary);
    border-radius: 0 3px 3px 0;
}

.nav-icon {
    font-size: 24px;
}

.nav-label {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* ============ CONTENT ============ */

.content {
    flex: 1;
    padding: 24px 32px;
    max-width: 100%;
}

/* ============ BUTTONS ============ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: var(--md-sys-shape-corner-large);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--md-sys-motion-duration);
    text-transform: none;
    letter-spacing: 0.01em;
    line-height: 1.25;
}

.btn-primary {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    box-shadow: var(--md-elevation-level1);
}

.btn-primary:hover {
    box-shadow: var(--md-elevation-level2);
    filter: brightness(1.05);
}

.btn-text {
    background: transparent;
    color: var(--md-sys-color-primary);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.btn-text:hover {
    background: rgba(27, 107, 75, 0.08);
}

/* ============================================
   AC Media Library — Auth (Login / Register)
   ============================================ */

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--md-sys-color-background);
    padding: 24px;
}

.auth-box {
    display: flex;
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-large);
    box-shadow: var(--md-elevation-level3);
    overflow: hidden;
    max-width: 960px;
    width: 100%;
    min-height: 600px;
    position: relative;
}

.auth-left {
    flex: 1;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-logo {
    margin-bottom: 32px;
}

.auth-logo img {
    max-width: 180px;
    height: auto;
    position: absolute;
    right: 135px;
    top: 25px;
}

.auth-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 32px;
}

.auth-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface-variant);
}

.auth-field input {
    padding: 12px 16px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-small);
    font-family: inherit;
    font-size: 15px;
    background: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    transition: border-color var(--md-sys-motion-duration);
}

.auth-field input:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 3px rgba(27, 107, 75, 0.12);
}

.auth-field input::placeholder {
    color: var(--md-sys-color-outline);
}

.auth-error {
    font-size: 14px;
    color: var(--md-sys-color-error);
    margin-bottom: 16px;
    min-height: 20px;
    display: none;
}

.auth-error.show {
    display: block;
}

.auth-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    justify-content: center;
    margin-bottom: 20px;
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-toggle {
    font-size: 14px;
    color: var(--md-sys-color-on-surface-variant);
    text-align: center;
}

.auth-toggle .btn-text {
    font-size: 14px;
    font-weight: 600;
    padding: 4px 8px;
    vertical-align: baseline;
}

.auth-right {
    flex: 1;
    display: flex;
    align-items: stretch;
    background: var(--md-sys-color-primary);
    min-height: 100%;
}

.auth-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============ Responsive ============ */

@media (max-width: 768px) {
    .auth-box {
        flex-direction: column-reverse;
        max-width: 480px;
    }

    .auth-right {
        min-height: 200px;
        max-height: 240px;
    }

    .auth-left {
        padding: 32px 24px;
    }
}

/* ============================================
   Success Overlay (nach Registrierung)
   ============================================ */

.auth-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.auth-overlay.show {
    display: flex;
}

.auth-overlay-box {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-large);
    box-shadow: var(--md-elevation-level4);
    padding: 48px 40px 32px;
    max-width: 440px;
    width: 90%;
    text-align: center;
}

.auth-overlay-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.auth-overlay-box h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 12px;
}

.auth-overlay-box p {
    font-size: 15px;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.6;
    margin-bottom: 28px;
}

.auth-overlay-box .btn {
    padding: 12px 40px;
    font-size: 15px;
}

/* ============================================
   Activation Status (after activation link)
   ============================================ */

.activation-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 24px;
}

.activation-success,
.activation-error {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-large);
    box-shadow: var(--md-elevation-level3);
    padding: 48px 40px;
    max-width: 520px;
    width: 100%;
    text-align: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.activation-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.activation-success .activation-icon {
    color: var(--md-sys-color-primary);
}

.activation-error .activation-icon {
    color: var(--md-sys-color-error);
}

.activation-success h3,
.activation-error h3 {
    font-size: 28px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 16px;
}

.activation-success p,
.activation-error p {
    font-size: 16px;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.6;
    margin-bottom: 32px;
}

.activation-success .btn,
.activation-error .btn {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
}

/* ============================================
   Product Overview
   ============================================ */

.overview-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 24px;
}

/* ============ Search ============ */

.overview-search {
    position: relative;
    margin-bottom: 20px;
    max-width: 480px;
}

.overview-search .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--md-sys-color-outline);
    font-size: 20px;
    pointer-events: none;
}

.overview-search input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-large);
    font-family: inherit;
    font-size: 15px;
    background: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    transition: border-color var(--md-sys-motion-duration);
}

.overview-search input:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 3px rgba(27, 107, 75, 0.12);
}

.overview-search input::placeholder {
    color: var(--md-sys-color-outline);
}

/* ============ Category Filter Chips ============ */

.filter-section-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.overview-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.overview-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.chip-filter {
    padding: 6px 16px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 20px;
    background: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface-variant);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--md-sys-motion-duration);
}

.chip-filter:hover {
    background: var(--md-sys-color-surface-variant);
}

.chip-filter.active {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    border-color: var(--md-sys-color-primary);
}

/* ============ Product Grid ============ */

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* ============ Product Card ============ */

.product-card {
    display: flex;
    flex-direction: column;
    background: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-large);
    overflow: hidden;
    transition:
        box-shadow var(--md-sys-motion-duration),
        transform var(--md-sys-motion-duration);
}

.product-card:hover {
    box-shadow: var(--md-elevation-level2);
    transform: translateY(-2px);
}

.product-card-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--md-sys-color-surface-variant);
    padding: 20px;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.product-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--md-sys-color-outline);
}

.product-card-placeholder .material-symbols-outlined {
    font-size: 48px;
}

.product-card-body {
    padding: 16px 16px 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-desc {
    font-size: 13px;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: auto;
}

.product-card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.chip.chip-sm {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
    display: inline-block;
    white-space: nowrap;
}

.chip.chip-sm.chip-feature {
    background: var(--md-sys-color-tertiary-container);
    color: var(--md-sys-color-on-tertiary-container);
}

.product-card-footer {
    padding: 8px 16px 16px;
}

.product-card-btn {
    width: 100%;
    justify-content: center;
}

.btn.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

/* ============ Empty State ============ */

.overview-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    gap: 12px;
    color: var(--md-sys-color-on-surface-variant);
    text-align: center;
}

.overview-empty p {
    font-size: 16px;
}

/* ============ Pagination ============ */

.overview-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 0 32px;
    flex-wrap: wrap;
}

.overview-pagination .page-btn {
    min-width: 36px;
    justify-content: center;
    background: transparent;
    color: var(--md-sys-color-on-surface-variant);
    border: 1px solid transparent;
}

.overview-pagination .page-btn:hover {
    background: var(--md-sys-color-surface-variant);
}

.overview-pagination .page-btn.current {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    border-color: var(--md-sys-color-primary);
}

.overview-pagination .page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.overview-pagination .page-info {
    font-size: 13px;
    color: var(--md-sys-color-on-surface-variant);
    margin-left: 8px;
}

/* ============================================
   Product Detail Page
   ============================================ */

.detail-layout {
    display: flex;
    max-height: calc(100vh - 64px);
    margin-top: 64px;
    gap: 0;
}

.detail-left {
    width: 50%;
    max-height: calc(100vh - 98px);
    min-height: calc(100vh - 98px);
    display: flex;
    align-items: center;
    position: sticky;
    top: 64px;
}

.detail-right {
    width: 50%;
    display: flex;
    flex-direction: column;
    padding: 24px 32px;
    overflow-y: auto;
    max-height: calc(100vh - 64px);
}

/* ============ Detail Top Bar ============ */

.detail-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-shrink: 0;
}

/* ============ Slider ============ */

.detail-slider {
    width: 100%;
    position: relative;
    padding: 24px;
    height: 100%;
}

.slider-main {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--md-sys-shape-corner-medium);
    display: flex;
    height: 100%;
}

.slider-slide {
    min-width: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    height: 100%;
}

.slider-slide.active {
    display: flex;
}

.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.slider-placeholder {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--md-sys-color-outline);
    gap: 12px;
    padding: 48px;
}

.slider-placeholder .material-symbols-outlined {
    font-size: 64px;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--md-sys-color-on-surface);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--md-elevation-level2);
    z-index: 10;
    transition: background var(--md-sys-motion-duration);
}

.slider-arrow:hover {
    background: #fff;
}

.slider-prev {
    left: 32px;
}

.slider-next {
    right: 32px;
}

.slider-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.thumb-item {
    width: 112px;
    height: 84px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all var(--md-sys-motion-duration);
    flex-shrink: 0;
}

.thumb-item:hover {
    opacity: 0.8;
}

.thumb-item.active {
    border-color: var(--md-sys-color-primary);
    opacity: 1;
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============ Detail Content ============ */

.detail-content {
    flex: 1;
    overflow-y: auto;
}

.detail-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 12px;
}

.detail-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.detail-text {
    font-size: 15px;
    color: var(--md-sys-color-on-surface);
    line-height: 1.7;
    margin-bottom: 28px;
}

/* ============ Detail Meta ============ */

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.detail-meta-item {
    background: var(--md-sys-color-surface-variant);
    border-radius: var(--md-sys-shape-corner-small);
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 120px;
}

.detail-meta-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface-variant);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-meta-value {
    font-size: 15px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
}

/* ============ Detail Sub Sections ============ */

/* ============ Detail Sub Sections ============ */

.detail-sub-section {
    margin-bottom: 24px;
}

.detail-sub-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--md-sys-color-primary);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.dl-text-content {
    padding: 16px;
    font-size: 15px;
    color: var(--md-sys-color-on-surface);
    line-height: 1.7;
}

/* ============ Download Blocks (Accordion) ============ */

.detail-downloads {
    display: flex;
    flex-direction: column;
}

.dl-block {
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-medium);
    overflow: hidden;
    background: var(--md-sys-color-surface);
    margin-bottom: 10px;
}

.dl-block-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    transition: background var(--md-sys-motion-duration);
    text-align: left;
}

.dl-block-header:hover {
    background: var(--md-sys-color-surface-variant);
}

.dl-block-header .material-symbols-outlined:first-child {
    color: var(--md-sys-color-primary);
    font-size: 22px;
}
.dl-block-header span:nth-child(2) {
    width: 100%;
}
.dl-count {
    margin-left: auto;
    font-size: 13px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    background: var(--md-sys-color-surface-variant);
    padding: 2px 10px;
    border-radius: 12px;
}

.dl-chevron {
    transition: transform var(--md-sys-motion-duration);
    font-size: 20px !important;
    color: var(--md-sys-color-on-surface-variant) !important;
}

.dl-block-header.open .dl-chevron {
    transform: rotate(180deg);
}

.dl-block-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-top: 0 solid transparent;
}

.dl-block-body.open {
    max-height: 2000px;
}

.dl-item {
    display: flex;
    align-items: center;
    padding: 10px 16px 10px 12px;
    gap: 8px;
    border-top: 1px solid var(--md-sys-color-outline-variant);
}

.dl-item-label {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    cursor: pointer;
    min-width: 0;
}

.dl-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--md-sys-color-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.dl-item-thumb {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--md-sys-color-surface-variant);
    flex-shrink: 0;
}

.dl-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dl-item-icon {
    font-size: 22px;
    color: var(--md-sys-color-primary);
    flex-shrink: 0;
}

.dl-item-name {
    font-size: 14px;
    color: var(--md-sys-color-on-surface);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.dl-item-meta {
    font-size: 12px;
    color: var(--md-sys-color-on-surface-variant);
    flex-shrink: 0;
}

.dl-item .btn-icon {
    flex-shrink: 0;
}

.dl-actions {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid var(--md-sys-color-outline-variant);
}

/* ============ Lightbox ============ */

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lightbox.open {
    display: flex;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    cursor: default;
}

.lightbox-media {
    display: none;
}

#lightboxVideo {
    max-width: 90vw;
    max-height: 90vh;
    background: #000;
    border-radius: 8px;
}

#lightboxIframe {
    width: 90vw;
    height: 90vh;
    background: #fff;
    border-radius: 8px;
}

.lightbox-loading {
    color: #fff;
    font-size: 18px;
    display: none;
    padding: 32px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 28px;
    font-size: 36px;
    color: #fff;
    cursor: pointer;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background var(--md-sys-motion-duration);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ============================================
   Partner Links
   ============================================ */

.detail-links {
    margin-bottom: 24px;
}

.detail-links-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface-variant);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.detail-link-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    margin: 0 8px 8px 0;
    background: var(--md-sys-color-surface-variant);
    border-radius: var(--md-sys-shape-corner-small);
    color: var(--md-sys-color-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--md-sys-motion-duration);
}

.detail-link-item:hover {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.detail-link-item .material-symbols-outlined {
    font-size: 18px;
}

/* ============================================
   Responsive — Detail Page
   ============================================ */

@media (max-width: 1024px) {
    .detail-layout {
        flex-direction: column;
    }

    .detail-left {
        width: 100%;
        min-height: auto;
        position: static;
    }

    .detail-slider {
        padding: 16px;
    }

    .slider-main {
        aspect-ratio: 16 / 9;
    }

    .detail-right {
        width: 100%;
        max-height: none;
        padding: 20px 24px;
    }

    .detail-top-bar {
        flex-wrap: wrap;
        gap: 8px;
    }

    .detail-title {
        font-size: 24px;
    }
}

@media (max-width: 600px) {
    .detail-left {
        width: 100%;
        min-height: auto;
        position: static;
    }

    .detail-slider {
        padding: 8px;
    }

    .slider-main {
        aspect-ratio: 4 / 3;
    }

    .slider-arrow {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    .slider-prev {
        left: 12px;
    }

    .slider-next {
        right: 12px;
    }

    .slider-thumbs {
        gap: 4px;
    }

    .thumb-item {
        width: 80px;
        height: 60px;
    }

    .detail-right {
        padding: 16px;
    }

    .detail-title {
        font-size: 20px;
    }

    .detail-top-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .detail-top-bar .btn {
        justify-content: center;
        width: 100%;
    }

    .detail-meta {
        flex-direction: column;
        gap: 8px;
    }

    .detail-meta-item {
        min-width: auto;
    }

    .dl-block-header {
        font-size: 14px;
        padding: 12px 12px;
    }

    .dl-item {
        padding: 8px 12px;
    }

    .dl-item-name {
        font-size: 13px;
    }

    .dl-actions {
        flex-direction: column;
        gap: 6px;
    }

    .dl-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .lightbox-content {
        max-width: 95vw;
        max-height: 85vh;
    }

    #lightboxIframe {
        width: 95vw;
        height: 85vh;
    }
}

/* ============================================
   Responsive — Overview Page
   ============================================ */

@media (max-width: 768px) {
    .overview-header h1 {
        font-size: 22px;
    }

    .content {
        padding: 16px;
    }

    .overview-categories {
        gap: 6px;
    }

    .overview-features {
        gap: 6px;
    }

    .chip-filter {
        font-size: 12px;
        padding: 5px 12px;
    }

    .overview-pagination {
        gap: 2px;
    }

    .overview-pagination .page-btn {
        min-width: 32px;
        font-size: 12px;
        padding: 4px 8px;
    }
}

@media (max-width: 600px) {
    .overview-header h1 {
        font-size: 20px;
    }

    .overview-search {
        max-width: 100%;
    }

    .overview-search input {
        font-size: 14px;
        padding: 10px 14px 10px 40px;
    }

    .overview-categories {
        gap: 4px;
    }

    .overview-features {
        gap: 4px;
    }

    .chip-filter {
        font-size: 11px;
        padding: 4px 10px;
    }

    .overview-pagination .page-info {
        font-size: 12px;
    }
}

/* ============================================
   Category Info Button & Modal
   ============================================ */

.chip-info-btn {
    font-size: 14px !important;
    margin-left: 4px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    transition: opacity var(--md-sys-motion-duration);
    vertical-align: middle;
}

.chip-info-btn:hover {
    opacity: 1;
}

.chip-filter .chip-info-btn {
    font-size: 16px !important;
    margin-left: 2px;
}

/* Category Info Modal */
.category-info-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.category-info-modal.open {
    display: flex;
}

.category-info-modal-content {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-large);
    box-shadow: var(--md-elevation-level3);
    width: 100%;
    max-width: 560px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: modalSlideUp 0.25s ease-out;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-info-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.category-info-modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
}

.category-info-modal-header .btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--md-sys-color-on-surface-variant);
    border-radius: var(--md-sys-shape-corner-small);
    cursor: pointer;
    transition: all var(--md-sys-motion-duration);
}

.category-info-modal-header .btn-icon:hover {
    background: var(--md-sys-color-surface-variant);
}

.category-info-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.category-info-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 12px 24px 20px;
    border-top: 1px solid var(--md-sys-color-outline-variant);
}

.cat-info-lang-block {
    margin-bottom: 16px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-medium);
    overflow: hidden;
}

.cat-info-lang-block:last-child {
    margin-bottom: 0;
}

.cat-info-lang-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
}

.cat-info-lang-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 20px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.1);
}

.cat-info-lang-body {
    padding: 12px 16px;
}

.cat-info-lang-body p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
}


