/* ================================
   Iran Nyheter - Flipboard-inspired
   Magazine-style UX
   ================================ */

/* CSS Variables */
:root {
    --bg-primary: #fafafa;
    --bg-secondary: #f0eeeb;
    --bg-card: #ffffff;
    --text-primary: #141416;
    --text-secondary: #555555;
    --text-muted: #6b6b6b;
    --border-color: rgba(0,0,0,0.04);
    --accent-color: #e63226;
    --accent-hover: #c7261c;
    --accent-light: rgba(230, 50, 38, 0.07);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
    --shadow: 0 2px 6px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
    --danger-color: #dc2626;
    --danger-light: rgba(220, 38, 38, 0.08);
    --success-color: #16a34a;

    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --transition-fast: 0.15s ease;
    --transition: 0.25s ease;

    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);

    --header-height: 56px;
    --tabs-height: 44px;
}

/* Dark theme */
[data-theme="dark"] {
    --bg-primary: #0f0f11;
    --bg-secondary: #161619;
    --bg-card: #1e1e24;
    --text-primary: #f0f0f2;
    --text-secondary: #a8a8bc;
    --text-muted: #8585a0;
    --border-color: rgba(255,255,255,0.06);
    --accent-color: #ff4444;
    --accent-hover: #ff6666;
    --accent-light: rgba(255, 68, 68, 0.10);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);
    --shadow: 0 2px 6px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.3);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.6), 0 2px 8px rgba(0,0,0,0.4);
    --danger-light: rgba(220, 38, 38, 0.15);
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

html {
    background-color: var(--bg-primary);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding-top: calc(var(--header-height) + var(--tabs-height) + var(--safe-top));
    padding-bottom: 0;
    overflow-x: hidden;
}


/* ================================
   Header - Flipboard style
   ================================ */
.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 var(--spacing-md);
    padding-top: var(--safe-top);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    min-height: var(--header-height);
    transition: transform 0.3s ease;
}

.header.header-hidden {
    transform: translateY(-100%);
}

[data-theme="dark"] .header {
    background: var(--bg-primary);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
    padding: var(--spacing-xs) 0;
    gap: var(--spacing-md);
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-shrink: 0;
}

.logo {
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    position: relative;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.logo-emblem {
    height: 2rem;
    width: 2rem;
    max-width: 2rem;
    object-fit: contain;
    flex-shrink: 0;
}

.logo-accent {
    color: var(--accent-color);
}

.logo-wrap {
    display: flex;
    flex-direction: column;
}

.header-updated {
    font-size: 0.65rem;
    color: var(--text-muted);
    white-space: nowrap;
    line-height: 1;
}

.header-search {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.header-search input {
    width: 100%;
    padding: 8px 36px 8px 40px;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition-fast);
    height: 40px;
}

.search-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}

.search-clear-btn:hover {
    color: var(--text-primary);
}

.header-search input:focus {
    outline: none;
    background: var(--bg-card);
    box-shadow: 0 0 0 2px var(--accent-color), 0 0 0 5px rgba(230, 50, 38, 0.12);
}

.header-search input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.header-search input:focus ~ .search-icon,
.header-search:focus-within .search-icon {
    color: var(--accent-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.theme-toggle {
    background: none;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    touch-action: manipulation;
    color: var(--text-muted);
}

.theme-toggle:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.theme-toggle:active {
    transform: scale(0.88);
}

.icon-sun, .icon-moon {
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { color: #fbbf24; }
[data-theme="light"] .icon-moon,
:root:not([data-theme]) .icon-moon { display: none; }

.tagline { display: none; }

/* ================================
   Category Tabs - Flipboard nav
   ================================ */
.category-tabs {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: calc(var(--header-height) + var(--safe-top));
    left: 0;
    right: 0;
    z-index: 999;
    transition: transform 0.3s ease;
    padding: 0 calc(max(var(--spacing-md), (100% - 1200px) / 2));
    display: flex;
    justify-content: center;
    align-items: stretch;
    height: var(--tabs-height);
}

.category-tabs.tabs-hidden {
    transform: translateY(calc(-100% - var(--header-height) - var(--safe-top)));
}

[data-theme="dark"] .category-tabs {
    background: var(--bg-primary);
}

.category-tabs-inner {
    flex-shrink: 1;
    min-width: 0;
    display: flex;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    height: var(--tabs-height);
    align-items: stretch;
}

.category-tabs-inner::-webkit-scrollbar { display: none; }

.category-tab {
    flex-shrink: 0;
    padding: 0 var(--spacing-md);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
    touch-action: manipulation;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
}

.category-tab:hover {
    color: var(--text-primary);
}

.category-tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    background: var(--accent-light);
    border-radius: 6px 6px 0 0;
}

.news-toggle,
.tweet-toggle,
.telegram-toggle,
.video-toggle {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 6px;
    cursor: pointer;
    user-select: none;
    border-left: 1px solid var(--border-color);
}

.news-toggle input[type="checkbox"],
.tweet-toggle input[type="checkbox"],
.telegram-toggle input[type="checkbox"],
.video-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
}

.news-toggle input[type="checkbox"]:focus-visible,
.tweet-toggle input[type="checkbox"]:focus-visible,
.telegram-toggle input[type="checkbox"]:focus-visible,
.video-toggle input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.news-toggle input[type="checkbox"],
.tweet-toggle input[type="checkbox"] {
    accent-color: #0f1419;
}

.telegram-toggle input[type="checkbox"] {
    accent-color: #2AABEE;
}

.video-toggle input[type="checkbox"] {
    accent-color: #ff0000;
}

.news-toggle-label,
.tweet-toggle-label,
.telegram-toggle-label,
.video-toggle-label {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.news-toggle-label {
    color: var(--text-primary);
}

.tweet-toggle-label {
    color: var(--text-primary);
}

.telegram-toggle-label {
    color: #2AABEE;
    display: inline-flex;
    align-items: center;
}

.video-toggle-label {
    color: #ff0000;
}

/* ================================
   Podcast Section - Custom Player
   ================================ */
.podcast-section {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.podcast-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-sm) var(--spacing-md);
}

.podcast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: var(--spacing-sm) 0;
    touch-action: manipulation;
}

.podcast-header-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.podcast-icon {
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 50%;
    flex-shrink: 0;
}

.podcast-icon svg {
    stroke: var(--text-muted);
}

.podcast-header-text h2 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.podcast-date {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.podcast-toggle-icon {
    font-size: 0.625rem;
    transition: var(--transition);
    color: var(--text-muted);
}

.podcast-section.collapsed .podcast-toggle-icon {
    transform: rotate(-90deg);
}

.podcast-section.collapsed .podcast-player { display: none; }

.podcast-player {
    padding: var(--spacing-sm) 0 var(--spacing-xs);
}

.podcast-player audio { display: none; }

.podcast-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) 0;
}

.podcast-play-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--accent-color);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition-fast);
    touch-action: manipulation;
}

.podcast-play-btn:hover { background: var(--accent-hover); box-shadow: 0 0 16px rgba(230, 50, 38, 0.35); }
.podcast-play-btn:active { transform: scale(0.95); }

.play-icon { margin-left: 2px; }

.podcast-progress-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.podcast-progress-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    touch-action: none;
}

.podcast-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
    pointer-events: none;
}

.podcast-progress-knob {
    width: 14px;
    height: 14px;
    background: var(--accent-color);
    border: 2px solid var(--bg-card);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--transition-fast);
    touch-action: none;
}

.podcast-progress-bar:hover .podcast-progress-knob,
.podcast-progress-bar:active .podcast-progress-knob {
    opacity: 1;
}

.podcast-progress-bar:hover {
    height: 8px;
}

.podcast-time {
    display: flex;
    justify-content: space-between;
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.podcast-speed-btn {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    background: none;
    color: var(--text-secondary);
    font-size: 0.6875rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition-fast);
    touch-action: manipulation;
    min-width: 44px;
    min-height: 44px;
    text-align: center;
}

.podcast-speed-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* ================================
   Main Content
   ================================ */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-sm) var(--spacing-md);
    width: 100%;
    box-sizing: border-box;
    min-height: calc(100dvh - 160px);
}

/* Hide sidebar on all views */
.filters-sidebar { display: none; }

/* ================================
   News Section
   ================================ */
.news-section { width: 100%; }

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
    margin-top: var(--spacing-md);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.news-header h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.news-header-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}


.news-count {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ================================
   News Grid - Magazine Layout
   ================================ */
.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
}

/* ================================
   News Card
   ================================ */
.news-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    animation: cardEntrance 0.4s ease forwards;
}

.news-card:active {
    transform: scale(0.99);
}

/* ── Breaking News Banner ── */
.breaking-banner {
    background: linear-gradient(90deg, #b71c1c, #d32f2f);
    color: #fff;
    overflow: hidden;
    position: relative;
    z-index: 90;
}

.breaking-banner-inner {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    max-width: 1200px;
    margin: 0 auto;
}

.breaking-badge {
    background: #fff;
    color: #b71c1c;
    font-weight: 800;
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    padding: 0.2em 0.6em;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    animation: breakingPulse 2s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

.breaking-banner-inner::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 120px;
    background: linear-gradient(90deg, #d32f2f 60%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

.breaking-banner-inner {
    position: relative;
}

@keyframes breakingPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.breaking-ticker {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    white-space: nowrap;
    animation: tickerScroll 120s linear infinite;
    width: max-content;
}

.breaking-ticker:hover {
    animation-play-state: paused;
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.breaking-item {
    color: #fff;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    transition: opacity 0.2s;
}

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

.breaking-sep {
    opacity: 0.5;
    flex-shrink: 0;
}

/* ── Editorial Summary ── */
.editorial-summary {
    margin: var(--spacing-sm) 0;
}

.editorial-summary-inner {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg) var(--spacing-md);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
}

.editorial-summary-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-color);
    margin: 0 0 var(--spacing-md);
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.editorial-summary-title::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: aiPulse 2s ease-in-out infinite;
}

@keyframes aiPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.editorial-summary-headline {
    font-size: 1.375rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.03em;
    margin: 0 0 var(--spacing-sm);
    color: var(--text-primary);
}

.editorial-summary-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0 0 var(--spacing-lg);
}

.editorial-top-stories {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.top-story-item {
    padding: var(--spacing-md);
    border-radius: 10px;
    background: var(--bg-card, rgba(0,0,0,0.03));
    border-left: 3px solid var(--accent-color);
    transition: background 0.15s ease;
}

[data-theme=dark] .top-story-item {
    background: rgba(255,255,255,0.04);
}

.top-story-item::before {
    content: none;
}

.top-story-content {
    flex: 1;
}

.top-story-headline {
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--text-primary);
}

.top-story-summary {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0.35em 0 0;
}

/* ── Editors Picks ── */
.editors-picks {
    margin: 0 0 var(--spacing-md);
}

.editors-picks-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-color);
    margin: 0 0 var(--spacing-sm);
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.editors-picks-title::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
}

.editors-picks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-sm);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xs);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
}

.ep-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.ep-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.ep-card:active {
    transform: scale(0.98);
}

.ep-card-image-wrap {
    overflow: hidden;
}

.ep-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    display: block;
    background: var(--bg-secondary);
    transition: transform 0.3s ease;
}

.ep-card:hover .ep-card-image {
    transform: scale(1.03);
}

.ep-card-content {
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-lg);
}

.ep-category {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent-color);
    display: inline-block;
    margin-bottom: 0.25em;
}

.ep-card-title {
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin: 0 0 var(--spacing-xs);
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ep-card-meta {
    display: flex;
    align-items: center;
    gap: 0.35em;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.ep-card-source {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ep-card-date {
    color: var(--text-muted);
}

.ep-card-date::before {
    content: "\00b7";
    margin-right: 0.35em;
}

.ep-card-excerpt {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: var(--spacing-xs);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Dark theme adjustments */
[data-theme="dark"] .breaking-banner {
    background: linear-gradient(90deg, #7f1d1d, #991b1b);
}

[data-theme="dark"] .editorial-summary-inner {
    box-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 4px 12px rgba(0,0,0,0.15);
}

[data-theme="dark"] .top-story-item {
    border-top-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .ep-card {
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

[data-theme="dark"] .ep-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .editorial-summary {
        padding: 0;
        margin: 0;
    }

    /* AI-sammanfattning mobil */
    .editorial-summary {
        margin: 8px 0;
    }

    .editorial-summary-inner {
        padding: var(--spacing-md);
        border-radius: 0;
    }

    .editorial-summary-headline {
        font-size: 1.0625rem;
    }

    /* Redaktörens val mobil */
    .editors-picks {
        padding: 0;
        margin: 8px 0;
    }

    .editors-picks-title {
        padding: 0 var(--spacing-md);
    }

    .editors-picks-grid {
        grid-template-columns: 1fr;
        gap: 0;
        border-radius: 0;
        padding: 0;
        box-shadow: none;
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
    }

    .ep-card {
        border-radius: 0;
        box-shadow: none;
        border: none;
        border-bottom: 1px solid var(--border-color);
    }

    .ep-card:last-child {
        border-bottom: none;
    }

    .ep-card-title {
        font-size: 1.0625rem;
    }

    .ep-card-content {
        padding: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .editors-picks-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

.news-card.read-article {
    animation: cardEntranceRead 0.4s ease forwards;
}

@keyframes cardEntranceRead {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 0.7; transform: none; }
}

.news-card-image-wrap {
    overflow: hidden;
}

.news-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: var(--bg-secondary);
    display: block;
    transition: transform 0.4s ease;
}

.telegram-card .news-card-image {
    object-fit: contain;
    background: var(--bg-primary);
}

.news-card-content {
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-lg);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
}

.news-card-source {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.news-card-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.news-card-date::before {
    content: "\00b7";
    margin-right: var(--spacing-sm);
}

.news-card-author {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

.news-card-author::before {
    content: "\00b7";
    margin-right: var(--spacing-sm);
}

/* Share button */
.share-btn {
    margin-left: auto;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    touch-action: manipulation;
}

.share-btn:hover {
    color: var(--accent-color);
    background: var(--accent-light);
}

.share-btn:active {
    transform: scale(0.9);
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: calc(20px + var(--safe-bottom));
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: var(--shadow-hover);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Highlight article when navigated to */
.news-card.highlight {
    animation: highlight-pulse 2s ease;
}

@keyframes highlight-pulse {
    0%, 100% { box-shadow: var(--shadow-sm); }
    50% { box-shadow: 0 0 0 3px var(--accent-color), var(--shadow-hover); }
}

.news-card-region {
    display: none;
}

.translated-badge {
    font-size: 0.6875rem;
    cursor: help;
}

.news-card-title {
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-title a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.news-card-excerpt {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ================================
   Tweet Card
   ================================ */
.news-card.tweet-card {
    border-left: 3px solid #0f1419;
}

[data-theme="dark"] .news-card.tweet-card {
    border-left-color: #8899a6;
}

.tweet-badge {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #0f1419;
    line-height: 1;
}

.news-card.tweet-card .news-card-source {
    color: #0f1419;
}

/* ================================
   Telegram Card
   ================================ */
.news-card.telegram-card {
    border-left: 3px solid #2AABEE;
}

[data-theme="dark"] .news-card.telegram-card {
    border-left-color: #5BC5F2;
}

.telegram-badge {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #2AABEE;
    line-height: 1;
}

.news-card.telegram-card .news-card-source {
    color: #2AABEE;
}

/* ================================
   Video Card
   ================================ */
.news-card.video-card {
    border-left: 3px solid #ff0000;
}

.video-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ff0000;
    color: #fff;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
}

.news-card-image-wrap {
    position: relative;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.video-play-overlay::after {
    content: '';
    border-left: 18px solid #fff;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    margin-left: 4px;
}

.video-play-overlay-large {
    width: 72px;
    height: 72px;
    pointer-events: none;
}

.video-play-overlay-large::after {
    border-left: 26px solid #fff;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    margin-left: 6px;
}

.video-embed {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 8px;
}


/* ================================
   Hero Card - First article
   ================================ */
.news-card.hero-card {
    grid-column: 1 / -1;
}

.news-card.hero-card .news-card-image {
    aspect-ratio: 2 / 1;
    object-fit: contain;
}

.news-card.hero-card .news-card-title {
    font-size: 1.625rem;
    line-height: 1.25;
    -webkit-line-clamp: 4;
}

.news-card.hero-card .news-card-excerpt {
    -webkit-line-clamp: 3;
    font-size: 1rem;
}

/* ================================
   Loading & Empty States
   ================================ */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl);
    color: var(--text-secondary);
}

.loading-spinner.hidden { display: none; }

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: var(--spacing-md);
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
    text-align: center;
    padding: var(--spacing-2xl) var(--spacing-md);
    color: var(--text-secondary);
}

.empty-state h3 {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

/* ================================
   Load More
   ================================ */
.load-more-container {
    display: flex;
    justify-content: center;
    padding: var(--spacing-xl) 0;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 32px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    touch-action: manipulation;
    min-height: 44px;
}

.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: scale(0.97); }

/* ================================
   Scroll to Top
   ================================ */
.scroll-top-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background 0.15s ease, color 0.15s ease;
    z-index: 900;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
    box-shadow: 0 4px 16px rgba(230,50,34,0.25);
}

.scroll-top-btn:active {
    transform: scale(0.9);
}

.scroll-top-btn:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

@media (max-width: 767px) {
    .scroll-top-btn {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
    }
}

/* ================================
   Footer
   ================================ */
.footer {
    background: var(--bg-primary);
    border-top: 0.5px solid var(--border-color);
    padding: var(--spacing-md) var(--spacing-md);
    padding-bottom: var(--spacing-md);
    margin-top: auto;
    flex-shrink: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xs);
}

.footer-sources {
    font-size: 0.6875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.footer-update {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-sm);
}

.auto-update-indicator {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.6875rem;
    color: var(--success-color);
    background: rgba(22, 163, 74, 0.08);
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

.pulse {
    width: 6px;
    height: 6px;
    background: var(--success-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

/* ================================
   Tablet (768px+)
   ================================ */
@media (min-width: 768px) {
    .header {
        padding: 0 var(--spacing-lg);
    }

    .header-search {
        display: block;
    }

    .logo { font-size: 1.5rem; }

    .category-tabs { padding: 0 var(--spacing-lg); }

    .main-content {
        padding: var(--spacing-xs) var(--spacing-md);
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }

    .news-card:hover {
        box-shadow: var(--shadow-hover);
        transform: translateY(-3px);
    }

    .news-card:hover .news-card-image {
        transform: scale(1.03);
    }

    .news-card:active {
        transform: translateY(-3px);
    }

    .news-card-title a:hover {
        color: var(--accent-color);
    }

    .podcast-container {
        padding: var(--spacing-sm) var(--spacing-lg);
    }
}

/* ================================
   Desktop (1024px+)
   ================================ */
@media (min-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-sm);
    }

    .news-card.hero-card .news-card-title {
        font-size: 1.875rem;
    }
}

/* ================================
   Large Desktop (1400px+)
   ================================ */
@media (min-width: 1400px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ================================
   Mobile (<768px)
   ================================ */
@media (max-width: 767px) {
    html {
        font-size: 17px;
    }

    :root {
        --header-height: 48px;
        --tabs-height: 40px;
    }

    body {
        letter-spacing: -0.015em;
        -webkit-font-smoothing: antialiased;
    }

    .header {
        padding: 0 var(--spacing-sm);
    }

    .header-content {
        gap: var(--spacing-xs);
        padding: 0;
    }

    .header-left {
        gap: var(--spacing-sm);
    }

    .logo {
        font-size: 1.125rem;
    }

    .logo-emblem {
        height: 1.5rem;
        width: 1.5rem;
        max-width: 1.5rem;
    }

    .header-updated {
        font-size: 0.6rem;
    }

    .header-actions {
        gap: 0;
    }

    .header-actions .theme-toggle {
        width: 38px;
        height: 38px;
    }

    .header-search {
        display: none;
    }

    .header-search.mobile-visible {
        display: block;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        padding: var(--spacing-sm) var(--spacing-md);
        background: rgba(250, 250, 250, 0.92);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border-color);
        max-width: none;
        z-index: 998;
    }

    [data-theme="dark"] .header-search.mobile-visible {
        background: rgba(15, 15, 17, 0.92);
    }

    .search-toggle-btn {
        background: none;
        border: none;
        width: 38px;
        height: 38px;
        border-radius: var(--radius-full);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-muted);
        transition: var(--transition-fast);
        touch-action: manipulation;
    }

    .search-toggle-btn:active {
        transform: scale(0.88);
    }

    /* Tabs */
    .category-tabs {
        padding: 0 var(--spacing-sm);
    }

    .category-tab {
        padding: 0 var(--spacing-sm);
        font-size: 0.8125rem;
    }

    /* Main content — kant-i-kant som Facebook */
    .main-content {
        padding: 0;
        padding-left: var(--safe-left);
        padding-right: var(--safe-right);
    }

    /* Perspektivbox mobil */
    .news-header {
        margin: 8px 0;
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .perspective-legend {
        width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
        box-shadow: none;
    }

    /* Nyhetskort mobil */
    .news-card {
        border-radius: 0;
        border: none;
        box-shadow: none;
        margin-bottom: 8px;
        border-bottom: 1px solid var(--border-color);
    }

    .news-grid {
        gap: 0;
        background: var(--bg-secondary);
    }

    /* News header controls full width */
    .news-header {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-xs);
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .news-header-controls {
        width: 100%;
        justify-content: space-between;
    }

    .news-count {
        font-size: 0.8125rem;
    }

    /* Cards */
    .news-grid {
        gap: var(--spacing-xs);
    }

    .news-card-content {
        padding: var(--spacing-md);
    }

    .news-card-title {
        font-size: 1.125rem;
        line-height: 1.35;
        letter-spacing: -0.025em;
    }

    .news-card-excerpt {
        -webkit-line-clamp: 5;
        line-height: 1.55;
    }

    .news-card-source {
        font-size: 0.8125rem;
    }

    .news-card-date {
        font-size: 0.8125rem;
    }

    /* Hero card mobile */
    .news-card.hero-card .news-card-image {
        aspect-ratio: 16 / 9;
    }

    .news-card.hero-card .news-card-title {
        font-size: 1.375rem;
    }

    .news-card.hero-card .news-card-excerpt {
        font-size: 0.9375rem;
        -webkit-line-clamp: 2;
    }

    /* Podcast */
    .podcast-container {
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .podcast-header-text h2 {
        font-size: 0.875rem;
    }

    /* Detail modal */
    .detail-modal-title {
        font-size: 1.25rem;
    }

    .detail-modal-ingress {
        font-size: 1.1rem;
    }

    .detail-modal-description {
        font-size: 1.0625rem;
    }

    /* Footer */
    .footer {
        padding: var(--spacing-sm) var(--spacing-sm);
    }

    .footer p {
        font-size: 0.8125rem;
    }

    .footer-sources {
        font-size: 0.6875rem;
    }
}

@media (min-width: 768px) {
    .search-toggle-btn { display: none; }
}

/* ================================
   Skip to content (a11y)
   ================================ */
.skip-to-content {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: #fff;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 10001;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-to-content:focus {
    top: var(--spacing-sm);
}

/* ================================
   Read/Unread articles
   ================================ */
.news-card.read-article {
    opacity: 0.7;
}

[data-theme="dark"] .news-card.read-article {
    opacity: 0.55;
    animation: cardEntranceReadDark 0.4s ease forwards;
}

@keyframes cardEntranceReadDark {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 0.55; transform: none; }
}

.read-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.read-badge svg {
    width: 11px;
    height: 11px;
    fill: none;
    stroke: #fff;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.detail-read-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.85em;
}

.detail-read-badge svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ================================
   Bookmark button
   ================================ */
.bookmark-btn {
    margin-left: auto;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    touch-action: manipulation;
}

.bookmark-btn:hover {
    color: var(--accent-color);
    background: var(--accent-light);
}

.bookmark-btn.bookmarked {
    color: var(--accent-color);
    animation: bookmarkPop 0.3s ease;
}

@keyframes bookmarkPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ================================
   Offline banner
   ================================ */
.offline-banner {
    background: #f59e0b;
    color: #1a1a1a;
    text-align: center;
    padding: 8px 16px;
    font-size: 0.8125rem;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1001;
}

/* ================================
   Focus visible (a11y)
   ================================ */
.news-card:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
    box-shadow: var(--shadow-hover);
}

.category-tab:focus-visible,
.theme-toggle:focus-visible,
.bookmark-btn:focus-visible,
.share-btn:focus-visible,
.podcast-play-btn:focus-visible,
.podcast-speed-btn:focus-visible,
.btn-primary:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* ================================
   Language toggle
   ================================ */
.lang-toggle-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

/* Language discovery pulse */
@keyframes lang-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5); }
    50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
}

#lang-toggle.lang-pulse {
    animation: lang-pulse 1.5s ease-in-out 4;
    border-radius: 8px;
}

/* Language discovery tooltip */
.lang-tooltip {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 200px;
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--text-primary);
    pointer-events: auto;
    cursor: pointer;
}

.lang-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 14px;
    width: 12px;
    height: 12px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    border-left: 1px solid var(--border-color);
    transform: rotate(45deg);
}

.lang-tooltip span {
    display: block;
}

.lang-tooltip .lang-tooltip-fa {
    direction: rtl;
    text-align: right;
}

/* ================================
   Modal / Overlay
   ================================ */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    animation: fadeIn 0.2s ease;
    -webkit-overflow-scrolling: touch;
}

[data-theme="dark"] .modal-backdrop {
    background: rgba(0, 0, 0, 0.7);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    max-width: 560px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 16px 48px rgba(0,0,0,0.18), 0 4px 12px rgba(0,0,0,0.08);
    animation: slideUp 0.25s ease;
}

[data-theme="dark"] .modal-content {
    box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-card);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    z-index: 1;
}

.modal-header h3 {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: var(--transition-fast);
    touch-action: manipulation;
}

.modal-close-btn:hover {
    background: var(--border-color);
    border-color: transparent;
    color: var(--text-primary);
}

.modal-close-btn:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.modal-body {
    padding: var(--spacing-md) var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.modal-empty {
    text-align: center;
    color: var(--text-muted);
    padding: var(--spacing-lg);
    font-size: 0.875rem;
}

.related-card {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    color: inherit;
}

.related-card:hover {
    background: var(--bg-secondary);
}

.related-card-image {
    width: 80px;
    height: 60px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.related-card-info {
    flex: 1;
    min-width: 0;
}

.related-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.related-card-source {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

@media (max-width: 767px) {
    .modal-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .modal-backdrop.detail-backdrop {
        align-items: stretch;
        background: var(--bg-primary);
        padding: 0;
    }

    .modal-content {
        max-width: 100%;
        max-height: 70vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .modal-header {
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
}

/* ================================
   Article Detail Modal
   ================================ */
.detail-modal {
    max-width: 1100px;
    max-height: calc(100vh - 2rem);
    height: calc(100vh - 2rem);
    overflow: hidden;
    background: var(--bg-card);
}

.detail-modal-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    will-change: transform, opacity;
}

.detail-modal-body {
    padding: 0;
    gap: 0;
}

.detail-modal-image-wrap {
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.detail-modal-image {
    width: 100%;
    max-height: 45vh;
    object-fit: contain;
    display: block;
    background: var(--bg-secondary);
}

.detail-modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    padding: var(--spacing-lg) var(--spacing-lg) 0;
}

.detail-modal-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.detail-modal-dot {
    margin: 0 2px;
    color: var(--text-muted);
}

.detail-modal-region {
    background: var(--accent-light);
    color: var(--accent-color);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.detail-modal-author {
    font-style: italic;
}

.detail-modal-ingress {
    padding: var(--spacing-md) var(--spacing-lg) 0;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0 var(--spacing-lg);
    border-left: 3px solid var(--accent-color);
    padding-left: var(--spacing-md);
    padding-right: 0;
}

[dir="rtl"] .detail-modal-ingress {
    border-left: none;
    border-right: 3px solid var(--accent-color);
    padding-left: 0;
    padding-right: var(--spacing-md);
}

.detail-modal-description {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.detail-modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    gap: var(--spacing-md);
}

.detail-modal-read-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 10px 20px;
    background: var(--accent-color);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-fast);
    touch-action: manipulation;
}

.detail-modal-read-btn:hover {
    background: var(--accent-hover);
}

.detail-modal-read-btn:active {
    transform: scale(0.97);
}

.detail-modal-read-btn:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.detail-modal-secondary-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.detail-share-btn,
.detail-bookmark-btn {
    background: none;
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition-fast);
    touch-action: manipulation;
}

.detail-share-btn:hover,
.detail-bookmark-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: var(--accent-light);
}

.detail-bookmark-btn.bookmarked {
    color: var(--accent-color);
    border-color: var(--accent-color);
    background: var(--accent-light);
}

.detail-share-btn:focus-visible,
.detail-bookmark-btn:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.detail-modal-original {
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.detail-modal-original-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.detail-modal-original-desc {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--text-muted);
    margin: 0;
}

.detail-modal--tweet {
    border-top: 3px solid var(--text-primary);
}

.detail-modal-handle {
    width: 36px;
    height: 4px;
    background: var(--text-muted);
    border-radius: var(--radius-full);
    margin: 8px auto 0;
    opacity: 0.4;
}

.detail-modal-source {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.detail-perspective-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.detail-perspective-tag .perspective-dot {
    width: 8px;
    height: 8px;
}

@media (max-width: 767px) {
    .detail-modal {
        max-width: 100%;
        max-height: 100%;
        height: 100%;
        border-radius: 0;
        background: var(--bg-primary);
    }

    .detail-modal .modal-header {
        border-radius: 0;
    }

    .detail-modal-title {
        font-size: 1.1875rem;
    }

    .detail-modal-image {
        width: 100%;
        max-height: 35vh;
    }

    .detail-modal-image-wrap .video-embed {
        border-radius: 0;
        aspect-ratio: 16 / 9;
        width: 100%;
        max-height: none;
        min-height: 56vw;
    }

    .video-detail-wrap {
        position: relative;
    }

    .video-fullscreen-btn {
        position: absolute;
        bottom: 12px;
        right: 12px;
        z-index: 10;
        width: 40px;
        height: 40px;
        border: none;
        border-radius: var(--radius-sm);
        background: rgba(0, 0, 0, 0.7);
        color: #fff;
        font-size: 1.2rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    .video-fullscreen-btn:active {
        background: rgba(0, 0, 0, 0.9);
    }

    .detail-modal-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .detail-modal-read-btn {
        justify-content: center;
        width: 100%;
    }

    .detail-modal-secondary-actions {
        justify-content: center;
    }

    .modal-backdrop.detail-backdrop {
        padding: 0;
        align-items: stretch;
    }
}

/* ================================
   Article Navigation (Detail Modal)
   ================================ */
.detail-nav-bar {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
}

.detail-nav-progress {
    flex: 1;
    height: 6px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.detail-nav-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
    border-radius: var(--radius-full);
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 2px;
    box-shadow: 0 0 6px rgba(245, 40, 40, 0.3);
}

[data-theme="dark"] .detail-nav-progress-fill {
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.4);
}

.detail-nav-counter {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    flex-shrink: 0;
}

.detail-nav-btn {
    background: none;
    border: 1px solid var(--border-color);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    touch-action: manipulation;
    flex-shrink: 0;
}

.detail-nav-btn:hover:not(:disabled) {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: var(--accent-light);
}

.detail-nav-btn:active:not(:disabled) {
    transform: scale(0.93);
}

.detail-nav-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.detail-nav-btn:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Swipe hint overlay */
.detail-swipe-hint {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
    z-index: 5;
}

.detail-swipe-hint.top {
    top: 12px;
}

.detail-swipe-hint.bottom {
    bottom: 12px;
}

.detail-swipe-hint.visible {
    opacity: 0.7;
}

/* Mobile: hide desktop nav buttons, show swipe handle */
@media (max-width: 767px) {
    .detail-nav-btn {
        display: none;
    }

    .detail-nav-bar {
        padding: var(--spacing-xs) var(--spacing-md);
    }
}

/* Desktop: hide the drag handle */
@media (min-width: 768px) {
    .detail-modal-handle {
        display: none;
    }
}

[dir="rtl"] .detail-modal-read-btn {
    flex-direction: row-reverse;
}

@media (max-width: 767px) {
    [dir="rtl"] .detail-modal-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ================================
   Related button on card
   ================================ */
.related-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    touch-action: manipulation;
}

.related-btn:hover {
    color: var(--accent-color);
    background: var(--accent-light);
}

.related-btn:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* ================================
   Share Collection (Footer)
   ================================ */
.footer-share {
    margin-top: var(--spacing-md);
}

.share-collection-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 8px 20px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    touch-action: manipulation;
}

.share-collection-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.share-collection-btn:active {
    transform: scale(0.97);
}

.share-collection-btn:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* ================================
   RTL Support (Persian)
   ================================ */
[dir="rtl"] {
    direction: rtl;
}

[dir="rtl"] body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

[dir="rtl"] .header-content {
    flex-direction: row-reverse;
}

[dir="rtl"] .header-actions {
    flex-direction: row-reverse;
}

[dir="rtl"] .header-search {
    direction: rtl;
}

[dir="rtl"] .header-search input {
    padding: 8px 40px 8px 16px;
    text-align: right;
}

[dir="rtl"] .search-icon {
    left: auto;
    right: 13px;
}

[dir="rtl"] .category-tabs-inner {
    flex-direction: row-reverse;
}

[dir="rtl"] .news-card-meta {
    flex-direction: row-reverse;
}

[dir="rtl"] .bookmark-btn {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .news-card.tweet-card {
    border-left: none;
    border-right: 3px solid #0f1419;
}

[data-theme="dark"][dir="rtl"] .news-card.tweet-card {
    border-right-color: #8899a6;
}

[dir="rtl"] .news-card.video-card {
    border-left: none;
    border-right: 3px solid #ff0000;
}

[dir="rtl"] .news-toggle,
[dir="rtl"] .tweet-toggle,
[dir="rtl"] .telegram-toggle,
[dir="rtl"] .video-toggle {
    border-left: none;
    border-right: 1px solid var(--border-color);
}

[dir="rtl"] .podcast-header-left {
    flex-direction: row-reverse;
}

[dir="rtl"] .podcast-controls {
    flex-direction: row-reverse;
}


[dir="rtl"] .related-card {
    flex-direction: row-reverse;
}

[dir="rtl"] .share-collection-btn {
    flex-direction: row-reverse;
}

/* ================================
   Utility
   ================================ */
.hidden { display: none !important; }

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ================================
   iOS Safari Fixes
   ================================ */
@supports (-webkit-touch-callout: none) {
    body { min-height: 100dvh; }
    .header-search input { font-size: 16px; }
}

@media (orientation: landscape) {
    .header {
        padding-left: calc(var(--spacing-md) + var(--safe-left));
        padding-right: calc(var(--spacing-md) + var(--safe-right));
    }
}



/* ================================
   Cluster Badge
   ================================ */
.cluster-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--accent-light);
    color: var(--accent-color);
    border: none;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    touch-action: manipulation;
    white-space: nowrap;
}

.cluster-badge:hover {
    background: var(--accent-color);
    color: #ffffff;
}

.cluster-badge:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.cluster-badge-icon {
    font-size: 0.625rem;
    transition: transform var(--transition-fast);
}

.cluster-badge.expanded .cluster-badge-icon {
    transform: rotate(180deg);
}

/* ================================
   Cluster Expansion
   ================================ */
.cluster-expansion {
    grid-column: 1 / -1;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    display: flex;
    flex-direction: column;
    gap: 2px;
    animation: fadeIn 0.2s ease;
}

.cluster-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
    cursor: pointer;
}

.cluster-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.cluster-item-source {
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
    min-width: 80px;
}

.cluster-item-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cluster-item-time {
    font-size: 0.6875rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.cluster-item-separator {
    color: var(--text-muted);
    margin: 0 2px;
}

/* ================================
   Perspective Dots
   ================================ */
.perspective-dots {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 4px;
}

.perspective-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    cursor: help;
}

.perspective-dot[data-perspective="state"] { background: #000; box-shadow: 0 0 0 1px rgba(255,255,255,0.3); }
[data-theme="dark"] .perspective-dot[data-perspective="state"] { background: #fff; box-shadow: none; }
.perspective-dot[data-perspective="opposition"] { background: #3b82f6; }
.perspective-dot[data-perspective="western"] { background: #22c55e; }
.perspective-dot[data-perspective="regional"] { background: #f97316; }
.perspective-dot[data-perspective="swedish"] { background: #eab308; }

.perspective-dot::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.6875rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-fast);
    z-index: 10;
}

.perspective-dot:hover::after {
    opacity: 1;
}

/* Perspective Legend */
.perspective-legend {
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm) var(--spacing-md);
    justify-content: center;
    margin: 0 auto;
    padding: 10px 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
}

.perspective-legend .news-count {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 700;
}

.perspective-legend-sep {
    background: var(--border-color);
    height: 14px;
    width: 1px;
}

.perspective-legend-item {
    align-items: center;
    color: var(--text-muted);
    display: inline-flex;
    font-size: 0.6875rem;
    gap: 4px;
    white-space: nowrap;
}

.perspective-legend-item .perspective-dot {
    cursor: default;
    height: 7px;
    width: 7px;
}

/* ================================
   Small phones (<375px, iPhone SE etc.)
   ================================ */
@media (max-width: 374px) {
    .logo {
        font-size: 1rem;
    }

    .logo-emblem {
        height: 1.25rem;
        width: 1.25rem;
        max-width: 1.25rem;
    }

    .header-actions .theme-toggle {
        width: 34px;
        height: 34px;
    }

    .search-toggle-btn {
        width: 34px;
        height: 34px;
    }

    .category-tab {
        padding: 0 6px;
        font-size: 0.6875rem;
    }

    .news-card.hero-card .news-card-title {
        font-size: 1.125rem;
    }

}

/* ================================
   Mobile adjustments for new features
   ================================ */
@media (max-width: 767px) {
    .cluster-expansion {
        padding: var(--spacing-xs);
        gap: 4px;
    }

    .cluster-item {
        flex-wrap: wrap;
        gap: 4px;
        padding: 8px;
        border-bottom: 1px solid var(--border-color);
    }

    .cluster-item:last-child {
        border-bottom: none;
    }

    .cluster-item-source {
        font-size: 0.6875rem;
        min-width: auto;
        order: 1;
    }

    .cluster-item-separator {
        display: none;
    }

    .cluster-item-title {
        flex-basis: 100%;
        order: 3;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        font-size: 0.8125rem;
        line-height: 1.4;
    }

    .cluster-item-time {
        order: 2;
        margin-left: auto;
    }

    .cluster-item .perspective-dot {
        order: 0;
    }

    .perspective-legend {
        padding: 5px 12px;
        gap: var(--spacing-xs) var(--spacing-sm);
    }

    .perspective-legend .news-count {
        font-size: 0.75rem;
    }

    .perspective-legend-sep {
        height: 12px;
    }

    .perspective-legend-item {
        font-size: 0.625rem;
        gap: 3px;
    }
}

/* ================================
   Dark theme adjustments
   ================================ */
[data-theme="dark"] .news-card {
    background: linear-gradient(145deg, var(--bg-card) 0%, rgba(255,255,255,0.03) 100%);
}

[data-theme="dark"] .cluster-item:hover {
    background: var(--bg-primary);
}

/* ================================
   RTL Support for new features
   ================================ */
[dir="rtl"] .perspective-legend {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .perspective-dots {
    margin-left: 0;
    margin-right: 4px;
}

[dir="rtl"] .perspective-dot::after {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

[dir="rtl"] .cluster-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .cluster-item-source {
    text-align: right;
}

/* ================================
   Reduced Motion (WCAG 2.3.3)
   ================================ */
/* ================================
   Video Landscape Fullscreen (mobil)
   ================================ */
.detail-backdrop.video-landscape-active {
    background: #000 !important;
    padding: 0 !important;
}

.video-landscape,
.video-landscape.modal-content {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #000 !important;
    overflow: hidden;
    animation: none;
}

.video-landscape .modal-header,
.video-landscape .detail-modal-title,
.video-landscape .detail-modal-meta,
.video-landscape .detail-modal-description,
.video-landscape .detail-modal-actions,
.video-landscape .detail-modal-original,
.video-landscape .detail-modal-secondary-actions {
    display: none;
}

.video-landscape .detail-modal-inner {
    width: 100% !important;
    height: 100% !important;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000 !important;
    padding: 0 !important;
}

.video-landscape .detail-modal-body {
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000 !important;
}

.video-landscape .detail-modal-image-wrap {
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background: #000 !important;
}

.video-landscape .video-embed {
    width: 100% !important;
    height: 100% !important;
    max-height: 100vh;
    aspect-ratio: 16 / 9;
    border-radius: 0 !important;
    object-fit: contain;
    background: #000 !important;
}

.video-landscape .detail-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10002;
    background: rgba(0, 0, 0, 0.35);
    border-top: none;
    border-radius: 0;
    padding-left: calc(var(--spacing-md) + var(--safe-left));
    padding-right: calc(var(--spacing-md) + var(--safe-right));
    padding-bottom: var(--safe-bottom);
}

.video-landscape .detail-nav-btn {
    display: flex;
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
    color: #fff;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.video-landscape .detail-nav-counter {
    color: rgba(255, 255, 255, 0.8);
}

.video-landscape .detail-nav-progress {
    background: rgba(255, 255, 255, 0.2);
}

.video-swipe-layer {
    display: none;
}

.video-landscape .video-swipe-layer,
.video-landscape .video-swipe-layer-right {
    display: none;
}

.landscape-close-btn {
    display: none;
}

.mobile-landscape .landscape-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: calc(10px + var(--safe-top));
    right: calc(10px + var(--safe-right));
    z-index: 10003;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    touch-action: manipulation;
}

.video-landscape .landscape-close-btn {
    background: rgba(255, 255, 255, 0.12);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}