:root {
    --beige: #F5E6D3;
    --red: #C41E3A;
    --gold: #D4AF37;
    --white: #FFFFFF;
    --dark: #2C1810;
    --shadow: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    appearance: textfield;
    -moz-appearance: textfield;
}

img {
    max-width: 100%;
}

body {
    font-family: 'Playfair Display', serif;
    background-color: var(--beige);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

body[lang="zh-TW"],
body[lang="zh-CN"] {
    font-family: 'Noto Serif TC', 'Noto Serif SC', serif;
}

img {
    max-width: 100%;
}

.floating-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1400px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px 40px;
    box-shadow: 0 8px 32px var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--red);
    text-decoration: none;
    white-space: nowrap;
}

.logo-symbol {
    font-size: 32px;
    color: var(--gold);
}

.main-nav {
    display: flex;
    gap: 35px;
    flex: 1;
    justify-content: center;
}

.nav-link {
    color: var(--dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--red);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gold);
}

.language-toggle {
    display: flex;
    gap: 10px;
    white-space: nowrap;
}

.lang-btn {
    padding: 8px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    color: var(--dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: var(--gold);
    color: var(--white);
}

.lang-btn.active {
    background: var(--red);
    color: var(--white);
}

.content-wrapper {
    padding-top: 120px;
    min-height: 100vh;
}

.hero-section {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, var(--beige) 0%, #E8D4BA 100%);
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(196, 30, 58, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-symbol {
    font-size: 80px;
    color: var(--gold);
    margin-bottom: 20px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.hero-title {
    font-size: 52px;
    color: var(--red);
    margin-bottom: 15px;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 28px;
    color: var(--dark);
    margin-bottom: 25px;
    font-weight: 600;
}

.hero-description {
    font-size: 18px;
    color: var(--dark);
    margin-bottom: 35px;
    line-height: 1.8;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    padding: 16px 50px;
    background: var(--red);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
}

.cta-button:hover {
    background: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 42px;
    color: var(--red);
    text-align: center;
    margin-bottom: 60px;
    font-weight: 700;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--gold);
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.mission-card {
    text-align: center;
    padding: 40px 30px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 4px 20px var(--shadow);
    transition: all 0.3s ease;
}

.mission-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.mission-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: inline-block;
}

.mission-card:nth-child(1) .mission-icon {
    color: var(--red);
}

.mission-card:nth-child(2) .mission-icon {
    color: var(--gold);
}

.mission-card:nth-child(3) .mission-icon {
    color: var(--red);
}

.mission-card:nth-child(4) .mission-icon {
    color: var(--gold);
}

.mission-card h3 {
    font-size: 24px;
    color: var(--dark);
    margin-bottom: 15px;
    font-weight: 700;
}

.mission-card p {
    font-size: 16px;
    color: var(--dark);
    opacity: 0.8;
    line-height: 1.6;
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.about-card {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 4px 20px var(--shadow);
    border-left: 4px solid var(--gold);
}

.about-card h3 {
    font-size: 26px;
    color: var(--red);
    margin-bottom: 20px;
    font-weight: 700;
}

.about-card p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--dark);
    opacity: 0.9;
}

.locations-section {
    background: var(--white);
    border-radius: 30px;
    padding: 60px;
    box-shadow: 0 4px 20px var(--shadow);
}

.locations-subtitle {
    text-align: center;
    font-size: 20px;
    color: var(--dark);
    opacity: 0.8;
    margin-bottom: 50px;
}

.map-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.map-svg {
    width: 100%;
    height: auto;
}

.location-marker {
    cursor: pointer;
    transition: all 0.3s ease;
}

.location-marker:hover {
    transform: scale(1.2);
}

.location-info {
    display: none;
    position: absolute;
    background: var(--white);
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px var(--shadow);
    border: 2px solid var(--gold);
    z-index: 100;
    pointer-events: none;
}

.location-info.active {
    display: block;
}

.location-info h4 {
    color: var(--red);
    font-size: 18px;
    margin-bottom: 5px;
}

.app-section {
    text-align: center;
}

.app-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    margin-top: 60px;
    flex-wrap: wrap;
}

.phone-mockup {
    width: 300px;
    height: 600px;
    background: linear-gradient(135deg, var(--red), #8B1528);
    border-radius: 40px;
    padding: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--beige);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: var(--gold);
}

.app-details {
    max-width: 500px;
    text-align: left;
}

.app-details h2 {
    font-size: 36px;
    color: var(--red);
    margin-bottom: 20px;
}

.app-details h3 {
    font-size: 28px;
    color: var(--gold);
    margin-bottom: 25px;
}

.app-details p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 35px;
    opacity: 0.9;
}

.features-list {
    list-style: none;
    margin-bottom: 35px;
}

.features-list li {
    padding: 12px 0;
    padding-left: 35px;
    font-size: 18px;
    position: relative;
}

.features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-weight: bold;
    font-size: 20px;
}

.app-downloads {
    margin-top: 1.25rem;
}

.app-downloads h4 {
    color: var(--red);
    margin-bottom: 1rem;
}

.store-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 260px;
    padding: 10px 16px;
    border-radius: 14px;
    border: 2px solid #3b3b3b;
    background: linear-gradient(180deg, #202020 0%, #000000 100%);
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.store-badge:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.store-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.google-play-icon {
    width: 34px;
    height: 34px;
    clip-path: polygon(0 0, 100% 50%, 0 100%, 20% 50%);
    background: linear-gradient(135deg, #00d0ff 0%, #00d084 33%, #ffd400 66%, #ff4f79 100%);
}

.apple-icon i {
    font-size: 34px;
    color: #ffffff;
}

.store-badge-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.store-badge-text small {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.82);
}

.store-badge-text strong {
    font-size: 28px;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: #ffffff;
}

.store-badge.app-store.is-disabled {
    cursor: not-allowed;
    opacity: 0.45;
    filter: grayscale(0.2);
}

.store-badge.app-store.is-disabled:hover {
    transform: none;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.app-availability-note {
    margin-top: 0.85rem;
    color: rgba(44, 24, 16, 0.78);
    font-size: 15px;
}

footer {
    background: var(--dark);
    color: var(--beige);
    text-align: center;
    padding: 40px 20px;
    margin-top: 80px;
}

.footer-text {
    font-size: 11px;
    margin-bottom: 15px;
    color: var(--gold);
}

.footer-copyright {
    font-size: 11px;
    opacity: 0.8;
}

@media (max-width: 1024px) {
    .floating-header {
        width: calc(100% - 40px);
        padding: 15px 20px;
    }

    .header-container {
        flex-wrap: wrap;
        gap: 15px;
    }

    .main-nav {
        order: 3;
        flex-basis: 100%;
        justify-content: center;
        gap: 20px;
    }

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

    .hero-subtitle {
        font-size: 24px;
    }

    .section-title {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .floating-header {
        top: 10px;
        border-radius: 15px;
    }

    .logo {
        font-size: 20px;
    }

    .logo-symbol {
        font-size: 28px;
    }

    .main-nav {
        gap: 15px;
    }

    .nav-link {
        font-size: 14px;
    }

    .hero-symbol {
        font-size: 60px;
    }

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

    .hero-subtitle {
        font-size: 20px;
    }

    .section {
        padding: 60px 20px;
    }

    .section-title {
        font-size: 30px;
    }

    .mission-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .app-container {
        gap: 40px;
    }

    .locations-section {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .language-toggle {
        gap: 5px;
    }

    .lang-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .hero-section {
        padding: 60px 20px;
    }

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

    .cta-button {
        padding: 14px 40px;
        font-size: 16px;
    }

    .phone-mockup {
        width: 250px;
        height: 500px;
    }
}

.navbar-collapse.collapse,
.navbar-collapse.collapsing {
        width: 100%;
    }

@media (max-width: 768px) {
    .header-container {
        flex-wrap: nowrap;       /* prevent wrapping */
        justify-content: space-between; /* logo left, toggler right */
        align-items: center;
        gap: 15px;
    }

    .navbar-toggler {
        margin-left: auto;       /* push toggler to the right */
    }
}

@media (max-width: 768px) {
    .navbar-collapse {
        position: fixed;        /* fixed to viewport */
        top: calc(20px + 60px); /* adjust: top padding + header height */
        left: 0;
        width: 100vw;           /* full viewport width */
        margin: 0;              /* remove container offsets */
        border-radius: 0 0 0 0; /* optional, remove rounding */
        padding: 15px 20px;
        background: rgba(255,255,255,0.95);
        backdrop-filter: blur(15px);
        z-index: 999;
    }

    .navbar-collapse.collapse {
        display: none;
    }

    .navbar-collapse.collapse.show {
        display: block;
    }

    .navbar-collapse .dropdown-menu {
        max-height: 300px;
        overflow-y: auto;
    }
}

.navbar-nav .dropdown-menu { 
    overflow: auto;
    max-height: 80vh;
}