:root {
    --primary: #f06414; /* Orange */
    --bg-light: #fbf9f1;
    --text-dark: #111111;
    --text-light: #ffffff;
    --gray-light: #e0e0e0;
    --gray-dark: #555555;
    --nav-bg: rgba(20, 20, 20, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Typography Details */
h1, h2, h3 { line-height: 1.2; }
.highlight { color: var(--primary); }

/* Top Navigation */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    padding: 15px 20px;
    pointer-events: none; /* Ensure empty header space doesn't block background clicks */
    transform: translateZ(0); /* Forces hardware acceleration and strict fixed behavior on mobile */
}
.nav-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    pointer-events: auto; /* Re-enable click for the logo */
}
.icon-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    opacity: 0.9;
    transition: opacity 0.2s;
}
.icon-btn:active { opacity: 0.5; }

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}
.main-logo-img {
    height: 48px;
    object-fit: contain;
}
.nav-home-btn {
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}
.nav-home-btn:active {
    transform: scale(0.95);
}

/* Main Container & SPA */
#app {
    position: relative;
    width: 100%;
    min-height: 100vh;
    max-width: 600px; /* Mobile optimal max width */
    margin: 0 auto;
    background: var(--bg-light);
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

.view {
    display: none;
    width: 100%;
    min-height: calc(100vh - 100px); /* Leave room for footer */
    animation: fadeIn 0.4s ease-out;
}
.view.active {
    display: block;
}

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

/* Heroes Wrapper */
.hero {
    position: relative;
    width: 100%;
    height: 45vh;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.4) 100%);
    z-index: 2;
}
.hero-title {
    position: relative;
    z-index: 3;
    font-size: 3.5rem;
    color: var(--text-light);
    text-align: center;
    font-weight: 600;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5);
    padding: 0 20px;
}

/* Content Blocks */
.content.block {
    padding: 30px 25px;
    background: var(--bg-light);
    border-radius: 20px 20px 0 0;
    position: relative;
    z-index: 10;
    margin-top: -20px;
}
.section-title {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 15px;
    color: #222;
}
.section-title strong { font-weight: 700; }
.section-desc {
    color: var(--gray-dark);
    font-size: 0.95rem;
    margin-bottom: 30px;
}

/* Language Selection Grid */
.language-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px 10px;
    justify-items: center;
}
.language-grid .lang-btn:nth-child(5),
.language-grid .lang-btn:nth-child(6),
.language-grid .lang-btn:nth-child(7) {
    grid-column: span 1;
}
.language-grid .lang-btn:nth-child(5) {
    grid-column-start: 2; /* offset center for exactly 3 items in second row */
}
/* A better way to center the last 3 flags is flexbox */
.language-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px 15px;
}

.lang-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    width: 70px;
}
.lang-btn:active {
    transform: scale(0.95);
    opacity: 0.8;
}
.lang-btn img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 8px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    border: 2px solid white;
}
.lang-btn span {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Footer Section */
.social-footer {
    text-align: center;
    padding: 40px 20px 30px;
    background: var(--bg-light);
    max-width: 600px;
    margin: 0 auto;
}
.social-footer p {
    font-size: 0.95rem;
    margin-bottom: 15px;
}
.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
}
.social-icons a img {
    width: 35px;
    height: 35px;
    transition: transform 0.2s;
    border-radius: 50%;
}
.social-icons a:active img {
    transform: scale(0.9);
}

/* Selection View Specific Styles */
.hero-overlay-dark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.7) 100%);
    z-index: 2;
}
.selection-hero .hero-title {
    font-size: 3rem;
    font-weight: 500;
}
.selection-cards-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-bottom: 50px; /* extra space */
}
.nav-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding: 24px 20px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
}
.nav-card:active {
    transform: scale(0.98);
}
.nav-card .card-text {
    flex: 1;
    padding-right: 15px;
}
.nav-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 6px;
}
.nav-card p {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.4;
}
.orange-card {
    background-color: var(--primary);
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(240, 100, 20, 0.3);
}
.light-card {
    background-color: #f2efe4;
    color: var(--text-dark);
}
.arrow-icon {
    flex-shrink: 0;
}
.highlight-stroke {
    stroke: var(--primary);
}

/* Detail Views Specific Styles */
.detail-hero .hero-title {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.3;
}
.title-underline {
    position: absolute;
    bottom: 25px;
    width: 60px;
    height: 3px;
    background-color: var(--primary);
    z-index: 3;
}
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 25px;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(240,100,20,0.3);
    align-self: flex-start;
}
.back-btn span {
    line-height: 1;
}
.info-list {
    padding-left: 20px;
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 20px;
}
.info-list li {
    margin-bottom: 12px;
    padding-left: 5px;
}
.audio-list {
    list-style: decimal;
}
.audio-list > li {
    font-size: 1.05rem;
    margin-bottom: 20px;
}
.app-links {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}
.pop-logo {
    width: 80px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.store-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.store-buttons img {
    height: 35px;
    object-fit: contain;
}
.divider {
    border: none;
    height: 1px;
    background-color: var(--gray-light);
    margin: 30px 0;
}
.btn-primary {
    width: 100%;
    padding: 15px;
    background-color: #ffead6;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 30px;
}
.btn-primary:active {
    background-color: var(--primary);
    color: white;
}
.map-btn {
    display: block;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}
.detail-photo {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.detail-photo-video {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    display: block;
    margin: 0 auto;
}
.watch-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}
.video-section-title {
    font-size: 1.45rem;
    font-weight: 700;
    text-align: center;
    color: var(--primary);
    margin: 35px 0 20px 0;
}
.text-center {
    text-align: center;
    margin-bottom: 20px;
}
.mx-top {
    margin-top: 20px;
}
.video-container {
    position: relative;
    width: 100%;
}
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.45);
    border-radius: 50%;
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.play-overlay svg {
    margin-left: 5px;
}

/* Marketplace Section */
.marketplace-section {
    padding: 30px 20px 40px;
    background: var(--bg-light);
}
.marketplace-title {
    text-align: center;
    font-size: 1.6rem;
    color: var(--text-dark);
    margin-bottom: 25px;
    font-weight: 700;
}
.marketplace-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.market-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--primary);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-dark);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    background: white;
    transition: transform 0.2s;
}
.market-card:active {
    transform: scale(0.96);
}
.market-img {
    width: 100%;
    height: 80px;
    object-fit: cover;
}
.market-name {
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.1;
    padding: 10px 5px;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.market-btn {
    background: var(--primary);
    color: white;
    text-align: center;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 8px 0;
    margin: 0 6px 6px 6px;
    border-radius: 4px;
}

/* Minimal Credits Footer */
.credits-footer {
    text-align: center;
    padding: 12px 10px;
    background-color: #2e2e2e;
    color: #888;
    font-size: 0.65rem;
    line-height: 1.5;
    border-top: 1px solid #222;
    max-width: 600px;
    margin: 0 auto;
}
.credits-footer p { margin: 2px 0; letter-spacing: 0.3px; }
.credits-footer strong { color: #bbb; font-weight: 500; }
.credits-footer a { color: #f78d1e; text-decoration: none; transition: color 0.3s ease; }
.credits-footer a:hover { color: #d17515; }
