/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #ffffff;
    color: #1a1a1a;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
.grid { display: grid; }

.flex-1 { flex: 1; }
.min-w-0 { min-width: 0; }
.flex-row { flex-direction: row; }
.align-start { align-items: flex-start; }
.text-left { text-align: left; }
.mt-60 { margin-top: 60px; }

.bg-blink { background-color: #00A8E1; }
.bg-disney { background-color: #001d3d; }
.bg-mouse { background-color: #6a994e; }
.bg-happy { background-color: #ff006e; }
.bg-bot { background-color: #3a86ff; }
.bg-scapes { background-color: #8338ec; }

.p-10 { padding: 10px; }
.mr-20 { margin-right: 20px; }
.mb-30 { margin-bottom: 30px; }
.fs-18 { font-size: 18px; }
.fs-24 { font-size: 24px; }
.fs-32 { font-size: 32px; }

.stat-grid-related {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* Header */
header {
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 40px;
}

.logo {
    font-weight: 700;
    font-size: 24px;
    color: #1a1a1a;
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav a {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
}

.main-nav a:hover {
    color: #000;
}

/* Section Common */
.section {
    margin-bottom: 60px;
}

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

.section-title {
    font-size: 20px;
    font-weight: 600;
}

.see-all {
    color: #666;
    font-size: 20px; /* arrow size */
}

/* Home Page Specific Grid - 4 columns */
.home-app-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px 40px;
}

/* App Grid - Standard for Category Pages - 2 columns */
.app-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 40px;
}

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

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

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

.app-item {
    display: flex;
    align-items: center;
    padding: 10px;
    transition: background-color 0.2s;
    border-radius: 12px;
    min-width: 0;
}

.app-item:hover {
    background-color: #f9f9f9;
}

.app-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
    margin-right: 16px;
    background-color: #eee; /* Placeholder bg */
    flex-shrink: 0;
}

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

.app-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-category {
    font-size: 13px;
    color: #888;
}

/* Categories Page */
.categories-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background-color: #eee;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 40px;
}

.category-item {
    background-color: #fff;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    transition: background-color 0.2s;
    text-decoration: none;
}

.category-item:hover {
    background-color: #f9f9f9;
}

.category-icon {
    color: #00a86b; /* Greenish generic color */
    width: 20px;
    text-align: center;
}

/* Detail Page */
.detail-header {
    display: flex;
    gap: 24px;
    margin-bottom: 30px;
}

.detail-icon {
    width: 120px;
    height: 120px;
    border-radius: 24px;
}

.detail-title h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.detail-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-row {
    display: flex;
    gap: 40px;
    padding: 20px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 14px;
}

.hero-image {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 40px;
}

.content-section h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 30px 0 16px;
}

.content-section p {
    color: #444;
    margin-bottom: 16px;
    line-height: 1.6;
}

/* Home Page Featured Sections */
.home-hero {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 60px;
}

.featured-main {
    position: relative;
    height: 400px;
    border-radius: 24px;
    overflow: hidden;
    background: #000;
}

.featured-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: white;
}

.featured-content h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
}

.featured-content p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 24px;
}

.featured-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card-stack {
    flex: 1;
    background: #f8fafc;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid #e2e8f0;
}

.card-stack-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-row-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #edf2f7;
}

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

.app-row-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
}

.app-row-info {
    flex: 1;
    min-width: 0;
}

.app-row-name {
    font-weight: 600;
    font-size: 14px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-row-meta {
    font-size: 12px;
    color: #718096;
}

.app-card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.app-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.2s;
}

.app-card:hover {
    transform: translateY(-4px);
}

.app-card-icon-wrapper {
    aspect-ratio: 1;
    border-radius: 22%;
    overflow: hidden;
    background: #f1f5f9;
}

.app-card-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-card-info {
    text-align: left;
}

.app-card-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 2px;
    display: block;
}

.app-card-cat {
    font-size: 13px;
    color: #64748b;
}

@media (max-width: 1024px) {
    .home-hero {
        grid-template-columns: 1fr;
    }
    .app-card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .app-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .featured-main {
        height: 300px;
    }
    .featured-content h2 {
        font-size: 24px;
    }
}

/* Editor's Pick Cards */
.editors-pick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.pick-card {
    position: relative;
    height: 200px;
    border-radius: 16px;
    overflow: hidden;
    background-color: #ddd;
}

.pick-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pick-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 20px;
    color: white;
}

.pick-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

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

/* Pagination */
.pagination-container {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #eee;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
    background: #fff;
}

.page-link:hover:not(.disabled):not(.active) {
    border-color: #00A8E1;
    color: #00A8E1;
}

.page-link.active {
    background-color: #00A8E1;
    border-color: #00A8E1;
    color: #fff;
}

.page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f9f9f9;
}

.page-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #999;
}

/* Footer */
footer {
    margin-top: 80px;
    padding: 40px 0;
    border-top: 1px solid #eee;
    color: #888;
    font-size: 13px;
}

.footer-links {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.footer-links a {
    color: #666;
}

/* Icons styling helper */
.icon {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* Specific Colors for demo */
.text-green { color: #00a86b; }
.text-blue { color: #007aff; }

.fs-14 { font-size: 14px; }
.fw-500 { font-weight: 500; }
.text-white { color: white; }
.font-bold { font-weight: bold; }

/* Breadcrumb */
.breadcrumb {
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #666;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #00A8E1;
    text-decoration: underline;
}

/* Detail Page New Styles */
.detail-content-wrapper {
    flex-wrap: nowrap;
}

.detail-header-new {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 40px;
}

.detail-header-new-icon {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    font-weight: bold;
    color: white;
}

.detail-header-new-content {
    flex: 1;
}

.detail-header-new-content h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.2;
}

.detail-category {
    color: #666;
    font-size: 14px;
    margin-bottom: 0;
}

/* About this app section */
.about-section {
    margin: 40px 0 0 0;
}

.about-section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 24px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 0;
}

.info-card {
    padding: 16px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #f9f9f9;
}

.info-card-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.info-card-value {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Download Buttons */
.download-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 40px 0;
    max-width: 100%;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.download-btn.google-play {
    background-color: #e8f5e9;
    color: #1b5e20;
}

.download-btn.google-play:hover:not(:disabled) {
    background-color: #c8e6c9;
}

.download-btn.app-store {
    background-color: #f5f5f5;
    color: #1a1a1a;
    border: 1px solid #ddd;
}

.download-btn.app-store:hover:not(:disabled) {
    background-color: #f0f0f0;
}

.download-btn:disabled,
.download-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(1);
}

/* Screenshots Grid */
.screenshots-container {
    overflow-x: hidden;
    overflow-y: hidden;
    padding: 12px 0;
    margin: 30px 0;
}

.screenshots-grid {
    display: flex;
    gap: 12px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.screenshot-item {
    height: 200px;
    min-width: 112px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background-color: #eee;
}

.screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Related/Top Apps Fix */
.app-list-section {
    width: 100%;
}

.app-list-small {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-item-small {
    display: flex;
    align-items: center;
    padding: 10px;
    transition: background-color 0.2s;
    border-radius: 12px;
    min-width: 0;
}

.app-item-small:hover {
    background-color: #f5f5f5;
}

.app-icon-small {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
    margin-right: 16px;
    background-color: #eee; /* Placeholder bg */
    flex-shrink: 0;
}

.app-info-small {
    flex: 1;
    min-width: 0;
}

.app-info-small .app-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-info-small .app-category {
    font-size: 13px;
    color: #888;
}

/* Sidebar Specific Utilities */
.sidebar-title {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

.footer-copyright {
    margin-top: 20px;
    color: #999;
}

.nav-active {
    color: black !important;
}

.logo-small {
    font-size: 18px;
}

.align-start-important {
    align-items: flex-start !important;
}

.w-280 {
    width: 280px;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.fs-14 {
    font-size: 14px;
}

.fw-500 {
    font-weight: 500;
}

.detail-main-content {
    flex: 1;
    min-width: 0;
    margin-right: 60px;
}

.detail-sidebar {
    width: 320px;
    flex-shrink: 0;
}

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

    .detail-main-content {
        margin-right: 0;
        margin-bottom: 40px;
    }

    .detail-sidebar {
        width: 100%;
    }
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    padding: 0;
    color: #1a1a1a;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: #fff;
        padding: 20px;
        border-bottom: 1px solid #eee;
        z-index: 100;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 20px;
    }
}

/* Rich Text & About Page Styles */
.rich-text-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.page-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 32px;
    color: #1a1a1a;
    letter-spacing: -1px;
}

.rich-content {
    line-height: 1.8;
    color: #333;
    font-size: 17px;
}

.lead-text {
    font-size: 20px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.rich-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 48px 0 20px;
    color: #1a1a1a;
}

.rich-content p {
    margin-bottom: 24px;
}

.rich-content blockquote {
    border-left: 4px solid #00A8E1;
    padding: 20px 30px;
    margin: 40px 0;
    background: #f0f9ff;
    font-style: italic;
    font-size: 20px;
    color: #0c4a6e;
    border-radius: 0 12px 12px 0;
}

.rich-content ul {
    margin: 24px 0;
    padding-left: 20px;
}

.rich-content li {
    margin-bottom: 12px;
    list-style-type: disc;
}

.content-image-box {
    margin: 40px 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.content-image-box img {
    width: 100%;
    height: auto;
    display: block;
}

.image-caption {
    padding: 12px;
    background: #f9f9f9;
    font-size: 14px;
    color: #888;
    text-align: center;
    margin-bottom: 0 !important;
}

.contact-cta {
    margin-top: 60px;
    padding: 40px;
    background: #1a1a1a;
    color: white;
    border-radius: 20px;
    text-align: center;
}

.contact-cta p {
    margin-bottom: 24px;
    font-size: 18px;
}

.btn-primary {
    display: inline-block;
    padding: 14px 32px;
    background: #00A8E1;
    color: white;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #008fbf;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .page-title {
        font-size: 32px;
    }

    .rich-content {
        font-size: 16px;
    }

    .lead-text {
        font-size: 18px;
    }

    .contact-cta {
        padding: 30px 20px;
    }
}
