* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    --bg-primary: #000000;
    --bg-secondary: #0c0d12;
    --bg-card: rgba(22, 24, 34, 0.7);
    --bg-card-hover: rgba(30, 34, 48, 0.85);
    --border-color: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.25);
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --text-muted: #6e6e73;
    --accent-apple: #2997ff;
    --accent-gradient: linear-gradient(135deg, #2997ff 0%, #9055ff 100%);
    --card-radius: 28px;
    --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Global Link & Anchor Resets to prevent browser default blue/underline */
a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

a:hover, a:visited, a:active, a:focus {
    color: inherit;
    text-decoration: none;
}

/* Background Atmosphere Glow */
.ambient-glow {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1000px;
    height: 600px;
    background: radial-gradient(circle, rgba(41, 151, 255, 0.12) 0%, rgba(144, 85, 255, 0.05) 50%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    filter: blur(90px);
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* Header & Glass Nav */
.header-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    background-color: rgba(0, 0, 0, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
    color: var(--text-primary) !important;
}

.brand-icon {
    width: 32px;
    height: 32px;
    background: var(--accent-gradient);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(41, 151, 255, 0.35);
}

.brand-icon svg {
    width: 18px;
    height: 18px;
    fill: #ffffff;
}

.brand-name {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary) !important;
    text-decoration: none !important;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    cursor: pointer;
}

.nav-back-link:hover {
    color: var(--text-primary) !important;
}

.nav-back-link svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

/* Language Selector Pill */
.lang-selector-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.lang-select-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    padding: 7px 14px;
    border-radius: 980px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.lang-select-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.25);
}

.lang-select-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    max-height: 380px;
    overflow-y: auto;
    background: rgba(24, 25, 32, 0.96);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 4px;
    z-index: 1001;
}

.lang-dropdown.show {
    display: flex;
}

.lang-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none !important;
}

.lang-option:hover, .lang-option.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.lang-option.active {
    font-weight: 600;
    color: var(--accent-apple);
}

/* Hero Section */
.hero-section {
    padding: 80px 0 40px;
    text-align: center;
}

.hero-eyebrow {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
    display: inline-block;
}

.hero-title {
    font-size: clamp(2.4rem, 5.5vw, 3.8rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.12;
    max-width: 840px;
    margin: 0 auto 18px;
    color: #ffffff;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2.2vw, 1.25rem);
    font-weight: 400;
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto 40px;
    line-height: 1.5;
}

/* Stats Ribbon */
.stats-ribbon {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto 50px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 22px;
    backdrop-filter: blur(10px);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.85rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
    display: block;
}

.stat-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
    display: block;
}

/* App Grid Section (Home) */
.apps-grid-section {
    padding: 20px 0 90px;
}

.section-header {
    margin-bottom: 40px;
    text-align: center;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
}

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

/* App Grid Card (Apple Connect Style) */
.app-grid-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 24px !important;
    padding: 32px 20px 24px !important;
    text-align: center !important;
    text-decoration: none !important;
    color: inherit !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    transition: var(--transition-smooth) !important;
    position: relative !important;
    overflow: hidden !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    cursor: pointer;
}

.app-grid-card:hover {
    transform: translateY(-6px) !important;
    background: var(--bg-card-hover) !important;
    border-color: var(--border-hover) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6) !important;
}

.grid-card-glow {
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.18;
    top: -40px;
    pointer-events: none;
    transition: opacity 0.3s;
}

.app-grid-card:hover .grid-card-glow {
    opacity: 0.4;
}

/* Apple Squircle Icon (App Store Connect / Dashboard Standard: 72px x 72px) */
.grid-app-icon {
    width: 72px !important;
    height: 72px !important;
    max-width: 72px !important;
    max-height: 72px !important;
    border-radius: 17px !important; /* Authentic Apple Continuous Corner Squircle */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.12) !important;
    margin-bottom: 16px !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
    display: block !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.app-grid-card:hover .grid-app-icon {
    transform: scale(1.06) !important;
}

/* App Title & Subtitle Styling (No underline, SF Pro style) */
.grid-app-title {
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.02em !important;
    color: #ffffff !important;
    text-decoration: none !important;
    margin-bottom: 6px !important;
    line-height: 1.25 !important;
}

.grid-app-category {
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    color: var(--text-secondary) !important;
    text-decoration: none !important;
    margin-bottom: 16px !important;
}

.grid-app-explore {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    color: var(--accent-apple) !important;
    text-decoration: none !important;
    margin-top: auto !important;
    padding-top: 8px !important;
    transition: gap 0.2s !important;
}

.app-grid-card:hover .grid-app-explore {
    gap: 10px !important;
}

/* App Detail Page Section */
.app-detail-section {
    padding: 50px 0 90px;
}

.app-detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    padding: 44px;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    position: relative;
    overflow: hidden;
}

.detail-card-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.2;
    top: -150px;
    right: -100px;
    pointer-events: none;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 48px;
    align-items: start;
}

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

/* Detail Page App Icon (88px x 88px squircle) */
.detail-app-icon {
    width: 88px !important;
    height: 88px !important;
    max-width: 88px !important;
    max-height: 88px !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.15) !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
}

.detail-title-group h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
    line-height: 1.15;
}

.detail-subtitle {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--accent-apple);
    margin-top: 6px;
}

.app-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.badge.version {
    background: rgba(41, 151, 255, 0.15);
    color: var(--accent-apple);
    border-color: rgba(41, 151, 255, 0.3);
}

.detail-promo {
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 28px;
    background: rgba(255, 255, 255, 0.04);
    padding: 18px 22px;
    border-radius: 16px;
    border-left: 4px solid var(--accent-apple);
}

.detail-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.65;
    white-space: pre-line;
    margin-bottom: 36px;
}

.detail-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* App Store Official Download Button */
.appstore-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    background: #ffffff !important;
    color: #000000 !important;
    padding: 12px 24px !important;
    border-radius: 980px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.25) !important;
    transition: var(--transition-smooth) !important;
}

.appstore-btn:hover {
    background: #f0f0f2 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 28px rgba(255, 255, 255, 0.35) !important;
}

.appstore-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.app-policy-link {
    color: var(--text-muted) !important;
    font-size: 0.85rem !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.app-policy-link:hover {
    color: var(--text-primary) !important;
}

/* Screenshots Showcase / Carousel */
.screenshots-container {
    width: 100%;
    overflow: hidden;
    padding: 10px 0;
}

.screenshots-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    -webkit-overflow-scrolling: touch;
}

.screenshots-track::-webkit-scrollbar {
    height: 6px;
}

.screenshots-track::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 980px;
}

.screenshot-item {
    flex: 0 0 190px;
    border-radius: 22px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.12);
    transition: var(--transition-smooth);
    cursor: pointer;
}

.screenshot-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(41, 151, 255, 0.4);
}

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 9 / 19.5;
    object-fit: cover;
}

/* Lightbox Modal for Screenshots */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-img {
    max-height: 88vh;
    max-width: 90vw;
    border-radius: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

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

/* Clean Minimal Footer */
.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #000000;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-contact-link {
    color: var(--text-secondary) !important;
    text-decoration: none !important;
    transition: color 0.2s;
}

.footer-contact-link:hover {
    color: var(--text-primary) !important;
}

.footer-bottom {
    margin-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Responsive Media Queries */
@media (max-width: 960px) {
    .apps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .stats-ribbon {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .apps-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .app-detail-card {
        padding: 24px 20px;
    }
    .detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .detail-app-icon {
        width: 72px !important;
        height: 72px !important;
    }
    .stats-ribbon {
        grid-template-columns: 1fr 1fr;
        padding: 16px;
    }
    .screenshot-item {
        flex: 0 0 160px;
    }
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* ==========================================================================
   Detail FAQ & Mini Guide Accordion (Apple Obsidian Glassmorphic)
   ========================================================================== */

.detail-faq-section {
    margin-top: 48px;
    background: rgba(18, 20, 29, 0.72);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--card-radius);
    padding: 44px 40px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.4s ease-out;
}

.faq-header {
    margin-bottom: 34px;
}

.faq-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 100px;
    border: 1px solid;
    margin-bottom: 14px;
    line-height: 1;
}

.faq-title {
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.25;
}

.faq-subtitle {
    font-size: 0.98rem;
    color: var(--text-secondary);
    max-width: 760px;
    line-height: 1.6;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq-item {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 18px;
    overflow: hidden;
    transition: background 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.14);
}

.faq-item.active {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.faq-question-btn {
    width: 100%;
    background: transparent;
    border: none;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 24px;
    cursor: pointer;
    outline: none;
    font-family: inherit;
    color: inherit;
}

.faq-q-number {
    font-size: 0.88rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    opacity: 0.95;
    flex-shrink: 0;
    min-width: 24px;
}

.faq-q-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.45;
    flex-grow: 1;
    letter-spacing: -0.012em;
}

.faq-toggle-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.25s ease,
                color 0.25s ease;
}

.faq-question-btn:hover .faq-toggle-icon {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.faq-item.active .faq-toggle-icon {
    transform: rotate(180deg);
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.faq-answer-collapse {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.active .faq-answer-collapse {
    grid-template-rows: 1fr;
}

.faq-answer-inner {
    overflow: hidden;
}

.faq-answer-inner p {
    padding: 0 24px 22px 64px;
    color: #a1a1a6;
    font-size: 0.95rem;
    line-height: 1.7;
    font-weight: 400;
    letter-spacing: -0.005em;
}

@media (max-width: 768px) {
    .detail-faq-section {
        padding: 30px 22px;
        margin-top: 36px;
    }
    .faq-title {
        font-size: 1.5rem;
    }
    .faq-subtitle {
        font-size: 0.9rem;
    }
    .faq-question-btn {
        padding: 16px 18px;
        gap: 12px;
    }
    .faq-q-text {
        font-size: 0.98rem;
    }
    .faq-answer-inner p {
        padding: 0 18px 18px 18px;
        font-size: 0.9rem;
        line-height: 1.65;
    }
}
