:root {
    /* Exact getmodsapk color palette */
    --primary-green: #00d084;
    --primary-dark: #00b874;
    --action-orange: #ff9f1a;
    --action-orange-hover: #e68e00;

    --bg-body: #f4f6f8;
    --bg-card: #ffffff;
    --bg-header: #ffffff;
    --bg-input: #ffffff;

    --text-main: #333333;
    --text-muted: #777777;
    --text-light: #aaaaaa;

    --border-color: #eaeaea;

    /* Dimensions */
    --container-width: 1140px;
    --header-height: 65px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.12);
}

:root.dark-mode {
    --bg-body: #10141a;
    --bg-card: #1c2431;
    --bg-header: #1c2431;
    --bg-input: #2a3441;

    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-light: #6b7280;

    --border-color: #2a3441;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background: var(--bg-header);
    height: var(--header-height);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-green);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.desktop-nav {
    display: flex;
    gap: 20px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 16px;
    color: var(--text-main);
    transition: transform 0.2s ease;
}

.nav-item:hover {
    transform: translateY(-2px);
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
}

.nav-icon svg {
    width: 16px;
    height: 16px;
}

/* specific nav colors */
.nav-home .nav-icon {
    background: #4ade80;
}

.nav-games .nav-icon {
    background: #f87171;
}

.nav-apps .nav-icon {
    background: #a78bfa;
}

.nav-blog .nav-icon {
    background: #60a5fa;
}

.nav-default .nav-icon {
    background: #9ca3af;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

.mobile-search-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    .desktop-theme-switch {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .mobile-search-toggle {
        display: block;
    }
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-body);
    z-index: 2000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-overlay.open {
    transform: translateX(0);
}

.mobile-nav-content {
    padding: 20px;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

.mobile-search {
    margin-bottom: 30px;
}

.mobile-search form {
    position: relative;
    display: flex;
}

.mobile-search input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 14px 20px;
    border-radius: var(--radius-lg);
    font-size: 16px;
    color: var(--text-main);
}

.mobile-search button {
    position: absolute;
    left: 15px;
    /* RTL left side */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--primary-green);
    cursor: pointer;
}

.mobile-nav-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 40px;
}

.mobile-nav-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 25px 15px;
    border-radius: var(--radius-xl);
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s;
}

.mobile-nav-card:active {
    transform: scale(0.95);
}

.mobile-nav-card svg {
    width: 32px;
    height: 32px;
}

.mobile-nav-card.nav-home {
    background: #60a5fa;
}

.mobile-nav-card.nav-games {
    background: #f43f5e;
    border-bottom: none;
}

.mobile-nav-card.nav-apps {
    background: #a855f7;
}

.mobile-nav-card.nav-blog {
    background: #eab308;
}

.mobile-nav-card.nav-faq {
    background: #22c55e;
}

.mobile-nav-card.nav-theme-toggle {
    background: #f97316;
}

.mobile-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.social-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.social-btn.telegram {
    background: #38bdf8;
}

.social-btn.whatsapp {
    background: #22c55e;
}

/* Theme Switcher */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    margin: 0;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e2e8f0;
    transition: .4s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
}

.slider.round {
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.theme-switch input:checked+.slider {
    background-color: #374151;
}

.theme-switch input:checked+.slider:before {
    transform: translateX(30px);
}

.icon-sun {
    color: #f59e0b;
    z-index: 1;
}

.icon-moon {
    color: #9ca3af;
    z-index: 1;
}

/* Hero Search Area */
.hero-section {
    background-color: var(--bg-card);
    padding: 50px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.hero-content h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.search-bar-large {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    box-shadow: var(--shadow-md);
    border-radius: 50px;
    background: var(--bg-input);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.search-bar-large form {
    display: flex;
}

.search-bar-large input {
    flex: 1;
    padding: 16px 25px;
    border: none;
    outline: none;
    font-size: 16px;
    color: var(--text-main);
    background: transparent;
    direction: rtl;
}

.search-bar-large button {
    background: var(--primary-green);
    color: #fff;
    border: none;
    padding: 0 30px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-bar-large button:hover {
    background: var(--primary-dark);
}

.search-bar-large button svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* --- Hero Slider (Native CSS) --- */
.hero-slider-wrapper {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    direction: ltr;
    /* Ensure LTR for easy horizontal scrolling */
}

.hero-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding: 10px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.hero-slider::-webkit-scrollbar {
    display: none;
}

/* Slider Overlays */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.4);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: #222;
    transition: background 0.2s;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.slider-btn:hover {
    background: rgba(255, 255, 255, 0.8);
}

.slider-btn.prev {
    left: -20px;
}

.slider-btn.next {
    right: -20px;
}

.slider-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.slider-pagination .dot {
    width: 8px;
    height: 8px;
    background: #ccc;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.slider-pagination .dot.active {
    background: #3b82f6;
    width: 24px;
    border-radius: 10px;
}

/* Slider Card Styles */
.slide-card {
    flex: 0 0 calc(50% - 10px);
    min-width: 320px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: var(--radius-xl);
    padding: 30px;
    scroll-snap-align: start;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.dark-mode .slide-card {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.slide-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.slide-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.slide-content-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.slide-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.slide-icon.fallback {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #cbd5e1;
}

.slide-info {
    text-align: left;
}

.slide-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 5px 0;
}

.slide-cat {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0;
    font-weight: 500;
}

.btn-get-slide {
    background: var(--primary-green);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 208, 132, 0.3);
    transition: transform 0.2s;
}

.slide-card:hover .btn-get-slide {
    transform: scale(1.05);
}

/* Sections */
.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 20px 0 20px;
    color: var(--text-main);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-green);
    display: inline-block;
}

/* App Grids */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.app-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 18px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    transition: all 0.25s ease;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
}

.dark-mode .app-card:hover {
    border-color: #4b5563;
}

/* Left Side: Icon */
.app-card-left {
    position: relative;
    flex-shrink: 0;
}

.app-icon-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    background-color: var(--bg-input);
}

.app-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.icon-refresh-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #3b82f6;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--bg-card);
}

.mod-badge {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    z-index: 2;
}

/* Right Side: Data */
.app-card-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    gap: 8px;
}

.app-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.app-title {
    font-weight: 800;
    font-size: 15px;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    line-height: 1.2;
}

.update-badge {
    background: #dcfce7;
    color: #16a34a;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.dark-mode .update-badge {
    background: rgba(22, 163, 74, 0.2);
    color: #4ade80;
}

.app-meta-row {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
}

.top-meta {
    justify-content: space-between;
}

.meta-cat {
    color: var(--text-muted);
}

.meta-size {
    color: var(--text-light);
}

.bottom-meta {
    justify-content: space-between;
    margin-top: auto;
}

.meta-version {
    color: var(--text-muted);
    font-weight: 600;
}

.meta-unlocked {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary-green);
    font-size: 12px;
    font-weight: 600;
}

/* Detail Page Layouts */
.detail-header-wrapper {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.detail-header-flex {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.detail-icon-frame {
    width: 150px;
    height: 150px;
    border-radius: 24px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.detail-icon-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-header-content {
    flex: 1;
}

.detail-title-large {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
    color: var(--text-main);
}

.detail-meta-tags {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    color: var(--text-muted);
    font-size: 14px;
}

.tag-version {
    background: #f8f0ff;
    color: #b026ff;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 600;
}

/* Star Rating */
.star-rating-block {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.stars-list {
    display: flex;
    gap: 4px;
    color: #b026ff;
    font-size: 18px;
}

.rating-text {
    font-weight: 600;
    color: var(--text-main);
}

/* Download Button - Purple Gradient */
.btn-download-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: linear-gradient(135deg, #d32aff 0%, #a612ff 100%);
    color: white;
    padding: 16px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    text-transform: capitalize;
    box-shadow: 0 4px 15px rgba(176, 38, 255, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}

.btn-download-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(176, 38, 255, 0.5);
    color: white;
}

/* Inline Download Button inside Articles */
a.btn-download-inline {
    display: table;
    margin: 30px auto;
    background: #00d084;
    color: white !important;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    text-decoration: none !important;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 208, 132, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}

a.btn-download-inline:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 208, 132, 0.4);
}

/* Info Grid (App Details meta boxes) */
.info-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-box-modern {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
}

.info-box-modern:hover {
    transform: translateY(-2px);
    border-color: var(--primary-green);
}

.ib-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f8f0ff;
    color: #b026ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.ib-content {
    display: flex;
    flex-direction: column;
}

.ib-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.ib-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
}

.ib-value.highlight {
    color: #b026ff;
}

/* --- Article Styling (The Beautiful Formatted Text - Reference Match) --- */
.prose {
    font-size: 17px;
    line-height: 2;
    color: #444;
    width: 100%;
    max-width: 950px;
    margin: 40px auto;
    background: var(--bg-card);
    color: var(--text-main);
}

.prose.prose-full-width {
    max-width: 100%;
}

/* Clear the card style */
.prose {
    border: none;
    box-shadow: none;
    border-radius: 0;
}

.prose h2,
.prose h3,
.prose h4 {
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 1em;
    line-height: 1.5;
    background-color: #f0fdf4;
    /* Light green background */
    border-right: 4px solid #16a34a;
    /* Solid green border on the right for RTL */
    color: #15803d;
    /* Dark green text */
    padding: 16px 20px;
    text-align: right;
}

/* Primary Section Headers */
.prose h2 {
    font-size: 1.6rem;
}

/* Subtitles */
.prose h3 {
    font-size: 1.4rem;
}

/* Paragraphs */
.prose p {
    margin-bottom: 1.8em;
    text-align: right;
    font-weight: 500;
    line-height: 2.1;
}

/* Links inside the article */
.prose a {
    color: #2b78e4;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.2s;
}

.prose a:hover {
    color: #16a34a;
}

/* Lists */
.prose ul,
.prose ol {
    margin-bottom: 1.8em;
    padding-right: 30px;
}

.prose li {
    margin-bottom: 0.8em;
    position: relative;
    font-weight: 500;
    line-height: 2;
}

/* Images */
.prose img {
    border-radius: 4px;
    /* Sharper corners as in screenshot */
    margin: 2em auto;
    box-shadow: none;
    /* Removed heavy shadow */
    width: 100%;
    max-width: 100%;
    display: block;
}

/* Blockquotes */
.prose blockquote {
    border-right: 4px solid #16a34a;
    padding-right: 25px;
    margin: 2em 0;
    font-style: normal;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 20px 20px 20px 15px;
    border-radius: 4px;
    font-size: 1.15rem;
    line-height: 2;
}

/* --- CKEditor Custom Styles --- */
.prose .alert {
    padding: 20px 25px;
    margin: 30px 0;
    border-radius: 8px;
    border-right: 5px solid;
    /* Solid border on the right for RTL */
    font-weight: 500;
    line-height: 1.8;
}

.prose .alert-info {
    background-color: #e0f2fe;
    border-right-color: #0284c7;
    color: #0c4a6e;
}

.prose .alert-success {
    background-color: #f0fdf4;
    border-right-color: #16a34a;
    color: #14532d;
}

.prose .alert-warning {
    background-color: #fffbeb;
    border-right-color: #f59e0b;
    color: #78350f;
}

.prose .alert-danger {
    background-color: #fef2f2;
    border-right-color: #dc2626;
    color: #7f1d1d;
}

.prose .callout-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    margin: 30px 0;
    font-size: 1.05em;
    font-weight: 600;
    color: #334155;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* --- End Article Styling --- */


/* Screenshots Area */
.screenshots-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.screenshots-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-main);
}

.screenshots-carousel {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 15px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: #b026ff #f0f0f0;
}

.screenshots-carousel::-webkit-scrollbar {
    height: 8px;
}

.screenshots-carousel::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.screenshots-carousel::-webkit-scrollbar-thumb {
    background-color: #b026ff;
    border-radius: 4px;
}

.screenshots-carousel img {
    height: 350px;
    width: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    scroll-snap-align: start;
    object-fit: cover;
}

/* =========================================
   Responsive Design (Tablet & Mobile)
   ========================================= */

/* --- Tablet (max-width: 1024px) --- */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }

    .app-layout-grid {
        /* Force the sidebar to drop below the main content on tablets */
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .nav-links {
        gap: 15px;
    }
}

/* --- Mobile (max-width: 768px) --- */
@media (max-width: 768px) {

    /* Header Adjustments */
    .header-inner {
        flex-direction: column;
        justify-content: center;
        padding-top: 10px;
    }

    .theme-switch-wrapper {
        margin-top: 15px;
    }

    header {
        height: auto;
        padding-bottom: 15px;
    }

    .nav-links {
        margin-top: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Hero Section */
    .hero-content h1 {
        font-size: 1.6rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    /* Detail Header */
    .detail-header-wrapper {
        padding: 20px;
    }

    .detail-header-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .detail-icon-frame {
        width: 120px;
        height: 120px;
    }

    .detail-title-large {
        font-size: 1.6rem;
    }

    .detail-meta-tags {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .star-rating-block {
        justify-content: center;
    }

    /* Info Grid (Modern Meta boxes) */
    .info-grid-modern {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    .info-box-modern {
        padding: 15px;
    }

    /* Article Content (Prose) */
    .prose {
        margin: 20px auto;
        font-size: 16px;
    }

    .prose h2 {
        font-size: 1.4rem;
        padding: 12px 15px;
    }

    .prose h3 {
        font-size: 1.2rem;
    }

    /* Screenshots */
    .screenshots-section {
        padding: 20px;
    }

    .screenshots-carousel img {
        height: 250px;
        /* Smaller heights for mobile */
    }

    /* Download Button Hero */
    .btn-download-hero {
        padding: 12px;
        font-size: 16px;
    }
}

/* --- Small Mobile (max-width: 480px) --- */
@media (max-width: 480px) {
    .app-grid {
        grid-template-columns: 1fr;
        /* Single column for app cards */
    }

    .info-grid-modern {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .info-box-modern {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 15px 10px;
        gap: 8px;
    }

    .ib-content {
        align-items: center;
    }

    .ib-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .ib-label {
        font-size: 11px;
    }

    .ib-value {
        font-size: 13px;
        text-align: center;
    }

    .screenshots-carousel img {
        height: 200px;
    }

    .search-bar-large {
        border-radius: 50px;
        /* Keep pill shape on mobile */
    }

    .search-bar-large input {
        padding: 12px 20px;
        font-size: 14px;
    }

    .search-bar-large button {
        padding: 0 20px;
    }
}

.app-layout-grid {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 2.5rem;
    margin-top: 30px;
    align-items: start;
}