/* ============================================
   SINGLE APP PAGE - CLEAN VERSION v2.1

   Features:
   - Enhanced Version History (8 versions, collapsible)
   - Screenshot Tabs (iPhone/iPad)
   - 3-Column Info Grid (NEW!)
   - Complete Dark Mode Fixes
   - Full Responsive Design
   ============================================ */

/* --- CORE PAGE VARIABLES --- */
:root {
    --ios-bg: #f2f2f7;
    --sidebar-bg: #e8e8ed;
    --ios-text: #1d1d1f;
    --ios-gray: #86868b;
    --ios-light-gray: #d1d1d6;
    --ios-blue: #0071e3;
    --ios-divider: #c7c7cc;
    --white: #ffffff;
}

body { 
    margin: 0; 
    font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, sans-serif; 
    background: #f2f2f7; 
}

/* Flex Layout */
.app-store-layout { 
    display: flex; 
    min-height: 100vh; 
    background: #f2f2f7;
}

/* Desktop Layout Offset */
@media (min-width: 769px) {
    .app-store-layout {
        padding-left: 290px;
        flex-direction: row;
    }
}

.store-main-content { 
    flex: 1; 
    background: #f2f2f7; 
    padding: 0; 
    overflow-x: hidden; 
    width: 100%;
}

.ios-web-container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 60px 40px 60px; 
    background: transparent;
}

/* ============================================
   HERO BANNER
   ============================================ */
.hero-wrapper { 
    width: 100%; 
    margin-bottom: 30px; 
    background: #ffffff;
}

.hero-banner { 
    position: relative; 
    width: 100%; 
    min-height: 280px;
    overflow: hidden; 
    display: flex; 
    align-items: center; 
    padding: 30px 60px; 
    box-sizing: border-box; 
}

.hero-bg-strip {
    position: absolute; 
    top: -50%; 
    left: -50%; 
    width: 200%; 
    height: 200%;
    background-position: center; 
    background-size: cover; 
    background-repeat: no-repeat;
    filter: blur(80px) brightness(0.7);
    z-index: 0; 
    transform: scale(1.2);
}

.hero-overlay {
    position: absolute; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 1;
}

.hero-content { 
    position: relative; 
    z-index: 2; 
    display: flex; 
    flex-direction: row; 
    align-items: flex-start; 
    gap: 25px;
    width: 100%; 
    max-width: 1200px;
    margin: 0 auto; 
}

.hero-icon-wrapper { 
    flex-shrink: 0; 
    position: relative;
}

.hero-icon { 
    width: 140px; 
    height: 140px; 
    border-radius: 32px; 
    border: 1px solid rgba(255,255,255,0.2); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.4); 
    display: block; 
}

.hero-text-content { 
    flex: 1; 
    padding-top: 5px; 
    color: #fff; 
}

.hero-title { 
    font-size: 28px; 
    font-weight: 700; 
    margin: 0 0 6px 0; 
    line-height: 1.1; 
    color: #ffffff !important; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.3); 
}

.hero-subtitle { 
    font-size: 16px; 
    color: rgba(255,255,255,0.9) !important; 
    margin: 0 0 18px 0; 
    font-weight: 500; 
}

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

.hero-get-btn { 
    background: #0071e3; 
    color: #fff !important; 
    padding: 8px 24px; 
    border-radius: 18px; 
    font-size: 14px; 
    font-weight: 600; 
    text-decoration: none; 
    transition: all 0.2s; 
    box-shadow: 0 4px 12px rgba(0,113,227,0.4); 
}

.hero-get-btn:hover { 
    background: #0077ed; 
    transform: translateY(-1px); 
    box-shadow: 0 6px 16px rgba(0,113,227,0.5); 
}

.hero-price-label { 
    font-size: 11px; 
    color: rgba(255,255,255,0.7) !important; 
}

.hero-share-btn { 
    background: rgba(255,255,255,0.15); 
    border: none; 
    color: #fff !important; 
    width: 34px; 
    height: 34px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    backdrop-filter: blur(10px); 
    transition: all 0.2s; 
}

.hero-share-btn:hover { 
    background: rgba(255,255,255,0.25); 
    transform: translateY(-1px); 
}

.hero-share-btn svg { 
    width: 16px; 
    height: 18px; 
}

.hero-cat-link { 
    color: rgba(255,255,255,0.9) !important; 
    text-decoration: none; 
    transition: color 0.2s; 
}

.hero-cat-link:hover { 
    color: #ffffff !important; 
    text-decoration: underline; 
}

/* ============================================
   HERO STATS BAR - ENHANCED
   ============================================ */
.hero-stats-bar { 
    display: flex; 
    justify-content: space-between; 
    padding: 18px 0; 
    border-bottom: 1px solid #d1d1d6;
    background: #ffffff;
    width: 100%; 
    max-width: 1200px;
    margin: 0 auto; 
}

.stat-block { 
    flex: 1; 
    text-align: center; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    min-height: 60px;
    min-width: 0;
    padding: 8px 5px;
}

.stat-block.border-left { 
    border-left: 1px solid #e5e5ea; 
}

.stat-top { 
    font-size: 20px; 
    font-weight: 700; 
    color: #1d1d1f !important; 
    display: flex; 
    align-items: center; 
    gap: 4px; 
    margin-bottom: 4px; 
}

.stat-star { 
    font-size: 12px; 
    color: #1d1d1f !important; 
}

.stat-caption { 
    font-size: 10px; 
    color: #8e8e93 !important; 
    font-weight: 500; 
    letter-spacing: 0.5px; 
    text-transform: uppercase; 
    white-space: nowrap; 
}

.stat-number { 
    line-height: 1; 
    color: #1d1d1f !important; 
}

.stat-text-val { 
    font-size: 17px; 
    font-weight: 700; 
    color: #1d1d1f !important; 
    line-height: 1; 
}

.stat-more { 
    font-size: 12px; 
    font-weight: 600; 
    color: #8e8e93 !important; 
}

.stat-value-text {
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1f !important;
    margin-top: 4px;
    line-height: 1.2;
    width: 100%;
    max-width: 100%;
    padding: 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
}

.stat-link { 
    color: #1d1d1f !important; 
    text-decoration: none; 
    transition: color 0.2s; 
}

.stat-link:hover { 
    color: var(--ios-blue) !important; 
    text-decoration: underline; 
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */
.section { 
    padding: 30px 0; 
    border-bottom: 1px solid rgba(0,0,0,0.08); 
    background: transparent; 
    margin-bottom: 0; 
}

.section:last-child { 
    border-bottom: none; 
}

.section-head { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 15px; 
}

h2, .section-title { 
    font-size: 22px; 
    font-weight: 700; 
    margin: 0; 
    color: #1d1d1f !important; 
}

.section-link { 
    font-size: 16px; 
    color: var(--ios-blue) !important; 
    text-decoration: none; 
}

.section-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ============================================
   UPDATED INFO SECTION
   ============================================ */
.updated-info-section {
    padding: 12px 0;
    color: #86868b !important;
    font-size: 13px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 15px;
}

.updated-icon {
    font-size: 14px;
    margin-right: 6px;
}

.updated-info-section strong {
    color: #1d1d1f !important;
    margin-left: 4px;
    font-weight: 600;
}

/* ============================================
   SCREENSHOTS - WITH TABS
   ============================================ */
.screenshots-section { 
    padding-top: 20px !important; 
    padding-bottom: 30px !important; 
}

.screenshot-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 10px;
}

.screenshot-tab {
    padding: 8px 16px;
    background: transparent;
    border: none;
    font-size: 15px;
    font-weight: 500;
    color: #86868b !important;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    position: relative;
    bottom: -10px;
}

.screenshot-tab:hover {
    color: #1d1d1f !important;
}

.screenshot-tab.active {
    color: var(--ios-blue) !important;
    border-bottom-color: var(--ios-blue);
    font-weight: 600;
}

.screenshot-tab-content {
    display: none;
}

.screenshot-tab-content.active {
    display: block;
}

.screenshots-container { 
    display: flex; 
    gap: 12px; 
    overflow-x: auto; 
    padding-bottom: 10px; 
    scrollbar-width: thin; 
    scrollbar-color: #86868b #d1d1d6; 
}

.screenshots-container::-webkit-scrollbar {
    height: 8px;
}

.screenshots-container::-webkit-scrollbar-track {
    background: #d1d1d6;
    border-radius: 4px;
}

.screenshots-container::-webkit-scrollbar-thumb {
    background: #86868b;
    border-radius: 4px;
}

.screenshot-frame { 
    flex: 0 0 auto; 
    width: 180px; 
    border-radius: 10px; 
    overflow: hidden; 
    border: 1px solid rgba(0,0,0,0.12); 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); 
    transition: transform 0.2s ease; 
    background: #ffffff; 
}

.screenshot-frame:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.screenshot-frame img { 
    width: 100%; 
    height: auto; 
    max-height: 320px; 
    object-fit: cover; 
    display: block; 
}

/* ============================================
   DOWNLOADS
   ============================================ */
.download-links-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 15px; 
}

.download-link-card { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    padding: 15px 20px; 
    background: rgba(255,255,255,0.8) !important; 
    border-radius: 12px; 
    text-decoration: none; 
    color: #1d1d1f !important; 
    transition: all 0.2s; 
    border: 1px solid rgba(0,0,0,0.06); 
}

.download-link-card:hover { 
    background: #ffffff !important; 
    transform: translateY(-2px); 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
}

.download-icon { 
    font-size: 32px; 
    width: 50px; 
    height: 50px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background: var(--ios-blue); 
    border-radius: 12px; 
    flex-shrink: 0; 
}

.download-info { 
    flex: 1; 
}

.download-title { 
    font-size: 16px; 
    font-weight: 600; 
    color: #1d1d1f !important; 
    margin-bottom: 4px; 
}

.download-version { 
    font-size: 13px; 
    color: #8e8e93 !important; 
}

.download-arrow { 
    font-size: 20px; 
    color: var(--ios-blue) !important; 
    font-weight: 700; 
}

/* ============================================
   DESCRIPTION
   ============================================ */
.desc-content { 
    font-size: 15px; 
    line-height: 1.5; 
    color: #1d1d1f !important; 
    overflow: hidden; 
    position: relative; 
}

.desc-content.collapsed { 
    max-height: 100px; 
    mask-image: linear-gradient(black 60%, transparent 100%); 
    -webkit-mask-image: linear-gradient(black 60%, transparent 100%); 
}

.desc-content p {
    color: #1d1d1f !important;
    margin-bottom: 12px;
}

.more-btn { 
    background: transparent; 
    border: none; 
    color: var(--ios-blue) !important; 
    font-size: 15px; 
    float: right; 
    margin-top: 5px; 
    cursor: pointer; 
    font-weight: 500; 
}

.more-btn:hover {
    opacity: 0.8;
}

.version-text { 
    font-size: 15px; 
    color: #86868b !important; 
}

.release-notes { 
    font-size: 15px; 
    color: #1d1d1f !important; 
    line-height: 1.5; 
}

/* ============================================
   RATINGS
   ============================================ */
.ratings-big-display { 
    display: flex; 
    gap: 40px; 
    align-items: center; 
    margin-bottom: 25px; 
}

.big-score { 
    font-size: 56px; 
    font-weight: 700; 
    color: #1d1d1f !important; 
    line-height: 1; 
}

.out-of { 
    font-size: 14px; 
    color: #86868b !important; 
    font-weight: 600; 
    margin-top: 4px; 
}

.rating-right { 
    flex: 1; 
    max-width: 350px; 
}

.rating-count-label { 
    text-align: right; 
    font-size: 13px; 
    color: #86868b !important; 
    margin-bottom: 4px; 
    font-weight: 600; 
}

.bar-row { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    margin-bottom: 2px; 
}

.stars { 
    width: 45px; 
    text-align: right; 
    font-size: 9px; 
    color: #86868b !important; 
    letter-spacing: 0.5px; 
}

.bar-bg { 
    flex: 1; 
    height: 4px; 
    background: rgba(0,0,0,0.1); 
    border-radius: 2px; 
}

.bar-fill { 
    height: 100%; 
    background: #8e8e93; 
    border-radius: 2px; 
}

.user-rating-container { 
    background: #ffffff !important; 
    border-radius: 12px; 
    padding: 20px; 
    text-align: center; 
    border: 1px solid rgba(0,0,0,0.06); 
    box-shadow: 0 4px 12px rgba(0,0,0,0.03); 
    margin-top: 15px; 
}

.tap-to-rate-label { 
    font-size: 14px; 
    color: #86868b !important; 
    margin-bottom: 12px; 
    font-weight: 500; 
}

.user-stars { 
    display: flex; 
    justify-content: center; 
    gap: 12px; 
    direction: row; 
}

.rate-star { 
    font-size: 36px; 
    color: #d1d1d6; 
    cursor: pointer; 
    line-height: 1; 
    transition: color 0.15s ease, transform 0.1s; 
}

.rate-star.filled, .rate-star.hover { 
    color: #007AFF; 
}

.rate-star:active { 
    transform: scale(1.2); 
}

.rating-message { 
    margin-top: 10px; 
    font-size: 14px; 
    font-weight: 600; 
    color: #007AFF !important; 
    min-height: 20px; 
}

.rating-message.error { 
    color: #FF3B30 !important; 
}

/* ============================================
   VERSION HISTORY SECTION - ENHANCED
   ============================================ */
.version-history-section {
    padding: 30px 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    background: transparent;
}

.version-item {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.version-item:hover {
    border-color: rgba(0,0,0,0.12);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.version-item.current-version {
    border-color: var(--ios-blue);
    border-width: 1.5px;
    background: linear-gradient(135deg, rgba(0,113,227,0.02) 0%, rgba(255,255,255,1) 100%);
}

.version-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 0;
}

.version-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.version-badge {
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f !important;
    background: rgba(0,0,0,0.05);
    padding: 4px 12px;
    border-radius: 6px;
    white-space: nowrap;
}

.current-version .version-badge {
    background: var(--ios-blue);
    color: #ffffff !important;
}

.version-badge.old {
    background: rgba(0,0,0,0.05);
    color: #86868b !important;
}

.version-date {
    font-size: 14px;
    color: #86868b !important;
    white-space: nowrap;
}

.version-more-btn {
    background: transparent;
    border: none;
    color: var(--ios-blue) !important;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.version-more-btn:hover {
    opacity: 0.7;
}

.version-more-btn .chevron-icon {
    transition: transform 0.3s ease;
    stroke: var(--ios-blue);
}

.version-more-btn.expanded .chevron-icon {
    transform: rotate(180deg);
}

.version-notes {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,0.06);
    font-size: 15px;
    line-height: 1.6;
    color: #1d1d1f !important;
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 1;
}

.version-notes.collapsed {
    max-height: 0;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    opacity: 0;
}

.version-notes p {
    margin: 0 0 8px 0;
    color: #1d1d1f !important;
}

.version-notes ul {
    margin: 8px 0;
    padding-left: 20px;
}

.version-notes li {
    margin-bottom: 6px;
    color: #1d1d1f !important;
}

.version-history-toggle {
    margin: 20px 0 15px 0;
    text-align: center;
}

.show-all-versions-btn {
    background: rgba(0,113,227,0.08);
    border: 1px solid rgba(0,113,227,0.2);
    color: var(--ios-blue) !important;
    font-size: 15px;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.show-all-versions-btn:hover {
    background: rgba(0,113,227,0.12);
    border-color: rgba(0,113,227,0.3);
    transform: translateY(-1px);
}

.show-all-versions-btn .chevron-icon {
    transition: transform 0.3s ease;
    stroke: var(--ios-blue);
}

.show-all-versions-btn.expanded .chevron-icon {
    transform: rotate(180deg);
}

.version-history-list {
    animation: fadeIn 0.4s ease;
}

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

.old-version {
    background: #f8f9fa;
    border-color: rgba(0,0,0,0.06);
}

.old-version:hover {
    background: #ffffff;
}

.old-version .version-header {
    opacity: 0.9;
}

/* ============================================
   INFO GRID - 3 COLUMNS (UPDATED)
   ============================================ */
.info-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr 1fr;  /* 3 columns */
    gap: 12px 30px; 
    margin: 0; 
}

.info-pair { 
    display: flex; 
    flex-direction: column; 
    gap: 4px; 
    border-bottom: 1px solid rgba(0,0,0,0.08); 
    padding-bottom: 12px; 
}

.info-pair:nth-last-child(-n+3) {  /* Last 3 items no border */
    border-bottom: none; 
}

.info-pair dt { 
    font-size: 14px; 
    color: #86868b !important; 
    font-weight: 500; 
}

.info-pair dd { 
    font-size: 15px; 
    color: #1d1d1f !important; 
    margin: 0; 
}

.info-link { 
    color: var(--ios-blue) !important; 
    text-decoration: none; 
    font-weight: 500; 
    transition: opacity 0.2s; 
}

.info-link:hover { 
    opacity: 0.7; 
    text-decoration: underline; 
}

.lang-toggle-container { 
    position: relative; 
}

.lang-preview { 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 5px; 
    transition: opacity 0.2s; 
    color: #1d1d1f !important;
}

.lang-preview:hover { 
    opacity: 0.7; 
}

.lang-chevron { 
    font-size: 10px; 
    color: #86868b !important; 
    transition: transform 0.2s ease; 
    margin-left: 4px; 
}

.lang-chevron.rotated { 
    transform: rotate(180deg); 
}

.lang-full-list { 
    display: none; 
    margin-top: 8px; 
    font-size: 14px; 
    line-height: 1.5; 
    color: #1d1d1f !important; 
    background: rgba(0,0,0,0.03); 
    padding: 8px 10px; 
    border-radius: 8px; 
}

/* ============================================
   RELATED APPS GRID
   ============================================ */
.as-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px; 
    margin-top: 20px; 
}

.as-card { 
    display: flex; 
    align-items: center; 
    padding: 15px; 
    border-radius: 16px; 
    text-decoration: none !important; 
    background-color: #FFFFFF !important; 
    transition: all 0.3s; 
    overflow: hidden; 
    cursor: pointer; 
    position: relative; 
    border: 1px solid rgba(0,0,0,0.05); 
}

.as-card:hover { 
    background-color: #FFFFFF !important; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
    transform: translateY(-2px); 
}

.as-card .as-title {
    color: #1d1d1f !important;
}

.as-card .as-desc {
    color: #86868b !important;
}

.as-card .as-btn {
    color: var(--ios-blue) !important;
    background: #F0F0F5 !important;
}

.as-icon { 
    width: 64px; 
    height: 64px; 
    border-radius: 14px; 
    object-fit: cover; 
    margin-right: 15px; 
    flex-shrink: 0; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); 
}

.as-details { 
    flex: 1; 
    min-width: 0; 
    overflow: hidden; 
}

.as-title { 
    font-size: 16px; 
    font-weight: 600; 
    margin: 0 0 2px 0; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.as-desc { 
    font-size: 13px; 
    margin: 0 0 4px 0; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.as-btn { 
    font-size: 13px; 
    font-weight: 600; 
    padding: 6px 18px; 
    border-radius: 20px; 
    text-transform: uppercase; 
    margin-left: 10px; 
    flex-shrink: 0; 
    white-space: nowrap; 
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    /* Info grid changes to 2 columns on tablet */
    .info-grid {
        grid-template-columns: 1fr 1fr;
    }

    .info-pair:nth-last-child(-n+3) {
        border-bottom: 1px solid rgba(0,0,0,0.08);
    }

    .info-pair:nth-last-child(-n+2) {
        border-bottom: none;
    }
}

@media (max-width: 768px) {
    .app-store-layout { 
        padding-left: 0; 
        flex-direction: column; 
    }

    .ios-web-container { 
        padding: 0 20px 20px 20px; 
    }

    .hero-banner { 
        padding: 25px 18px; 
        min-height: 220px; 
    }

    .hero-content { 
        gap: 18px; 
    }

    .hero-icon { 
        width: 115px; 
        height: 115px; 
        border-radius: 26px; 
    }

    .hero-text-content { 
        padding-top: 0; 
    }

    .hero-title { 
        font-size: 22px; 
        margin-bottom: 5px; 
    }

    .hero-subtitle { 
        font-size: 14px; 
        margin-bottom: 14px; 
    }

    .hero-actions { 
        gap: 10px; 
        flex-wrap: wrap; 
    }

    .hero-get-btn { 
        padding: 7px 20px; 
        font-size: 14px; 
        border-radius: 17px; 
    }

    .hero-stats-bar { 
        overflow-x: auto; 
        justify-content: flex-start; 
        padding: 16px 12px; 
    }

    .stat-block { 
        min-width: 90px; 
        padding: 6px 4px; 
    }

    .stat-value-text {
        font-size: 12px;
        -webkit-line-clamp: 3;
    }

    .rating-right { 
        width: 100%; 
    }

    .as-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 15px; 
    }

    /* Info grid single column on mobile */
    .info-grid { 
        grid-template-columns: 1fr; 
    }

    .info-pair:nth-last-child(-n+2) {
        border-bottom: 1px solid rgba(0,0,0,0.08);
    }

    .info-pair:last-child {
        border-bottom: none;
    }

    .screenshot-tabs {
        gap: 10px;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .screenshot-tab {
        font-size: 14px;
        padding: 6px 12px;
        white-space: nowrap;
    }

    .version-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .version-info {
        width: 100%;
        justify-content: space-between;
    }

    .version-more-btn {
        align-self: flex-end;
    }

    .version-item {
        padding: 14px 16px;
    }

    .version-badge {
        font-size: 14px;
        padding: 3px 10px;
    }

    .version-date {
        font-size: 13px;
    }

    .version-notes {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .hero-icon { 
        width: 95px; 
        height: 95px; 
        border-radius: 22px; 
    }

    .hero-title { 
        font-size: 19px; 
    }

    .as-grid { 
        grid-template-columns: 1fr; 
    }

    .as-icon { 
        width: 56px; 
        height: 56px; 
    }

    .ratings-big-display {
        flex-direction: column;
        gap: 25px;
        align-items: flex-start;
    }

    .rating-right {
        max-width: 100%;
    }

    .version-history-toggle {
        margin: 15px 0 10px 0;
    }

    .show-all-versions-btn {
        font-size: 14px;
        padding: 8px 20px;
    }

    .version-item {
        border-radius: 10px;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-dark { color: #1d1d1f !important; }
.text-gray { color: #86868b !important; }
.text-blue { color: var(--ios-blue) !important; }
.bg-white { background: #ffffff !important; }

html {
    scroll-behavior: smooth;
}

::selection {
    background: var(--ios-blue);
    color: #ffffff;
}

::-moz-selection {
    background: var(--ios-blue);
    color: #ffffff;
}

/* Dark Mode Overrides (Force Light Colors) */
@media (prefers-color-scheme: dark) {
    .version-item {
        background: #1c1c1e !important;
        border-color: rgba(255,255,255,0.1) !important;
    }

    .version-item.current-version {
        background: linear-gradient(135deg, rgba(0,113,227,0.15) 0%, rgba(28,28,30,1) 100%) !important;
        border-color: var(--ios-blue) !important;
    }

    .version-notes,
    .version-notes p,
    .version-notes li {
        color: #f2f2f7 !important;
    }

    .old-version {
        background: #2c2c2e !important;
    }

    .old-version:hover {
        background: #1c1c1e !important;
    }
}