﻿/* ===== CSS Variables & Reset ===== */
:root {
    --primary-color: #2563EB;
    --primary-light: #EFF6FF;
    --primary-dark: #1D4ED8;
    --accent-color: #8B5CF6;
    --accent-pink: #EC4899;
    --text-dark: #0F172A;
    --text-light: #475569;
    --text-muted: #94A3B8;
    --bg-white: #ffffff;
    --bg-light: #FAFBFC;
    --bg-section: #F8FAFC;
    --border-color: #E2E8F0;
    --gradient-primary: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
    --gradient-accent: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    --gradient-dark: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(37, 99, 235, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background: var(--bg-white);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    z-index: 1000;
    box-shadow: 0 1px 0 var(--border-color);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 70px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
}

.logo-accent {
    color: var(--accent-orange);
}

/* Desktop Nav */
.nav-desktop {
    display: flex;
}

.nav-menu {
    display: flex;
    gap: 8px;
    align-items: center;
    /* Ensure vertical alignment */
}

.nav-link {
    padding: 10px 16px;
    font-weight: 500;
    color: var(--text-dark);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: inline-flex;
    /* Better control */
    align-items: center;
    white-space: nowrap;
    /* Prevent wrapping */
}

.nav-link:hover,
.nav-link.active {
    background: rgba(0, 0, 0, 0.08);
}

/* Navigation Button */
.nav-link.nav-btn-download {
    background: var(--primary-light);
    color: var(--primary-color) !important;
    border: 1px solid var(--primary-color);
    padding: 8px 16px;
    margin-left: 8px;
    border-radius: 50px;
    height: 40px;
    /* Explicit height to match alignment */
    line-height: 1;
}

.nav-link.nav-btn-download:hover {
    background: var(--primary-color);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Dropdown */
.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    min-width: 180px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 12px 20px;
    font-size: 14px;
    transition: var(--transition);
}

.dropdown-menu li a:hover {
    background: var(--bg-light);
    color: var(--accent-orange);
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 12px;
}

.btn-login,
.btn-register {
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-login {
    color: var(--text-dark);
}

.btn-login:hover {
    background: rgba(0, 0, 0, 0.08);
}

.btn-register {
    background: var(--text-dark);
    color: var(--bg-white);
}

.btn-register:hover {
    background: #333;
    transform: translateY(-2px);
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-weight: 600;
    color: var(--text-dark);
}

.btn-logout {
    padding: 6px 16px;
    background: transparent;
    border: 1px solid var(--text-dark);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background: var(--text-dark);
    color: var(--bg-white);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    transition: var(--transition);
}

/* Mobile Nav */
.nav-mobile {
    display: none;
    background: var(--bg-white);
    border-top: 1px solid #eee;
}

.nav-mobile.active {
    display: block;
}

.mobile-menu a {
    display: block;
    padding: 16px 24px;
    border-bottom: 1px solid #eee;
    font-weight: 500;
}

.mobile-auth-divider {
    height: 1px;
    background: #eee;
    margin: 10px 24px;
}

.mobile-user-info {
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-user-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

.mobile-btn-logout {
    color: var(--accent-orange) !important;
    padding-left: 0 !important;
    border-bottom: none !important;
    font-size: 14px !important;
}

/* ===== Hero Section ===== */
.hero {
    padding: 120px 24px 80px;
    background: linear-gradient(180deg, #ffffff 0%, #F8FAFC 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 60%);
    border-radius: 50%;
    filter: blur(40px);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.06) 0%, transparent 60%);
    border-radius: 50%;
    filter: blur(40px);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

.hero-title {
    margin-bottom: 24px;
}

.title-main {
    display: block;
    font-size: 52px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.15;
    letter-spacing: -1px;
}

.title-sub {
    display: block;
    font-size: 22px;
    font-weight: 500;
    color: var(--text-light);
    margin-top: 16px;
    line-height: 1.5;
}

.hero-description {
    font-size: 17px;
    color: #666;
    margin-bottom: 32px;
    max-width: 480px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.btn-primary,
.btn-secondary {
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
    background: #ffffff;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 13px;
    color: var(--text-light);
    margin-top: 6px;
}

/* Phone Mockup */
.phone-mockup {
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-image {
    max-width: 320px;
    height: auto;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* ===== Services Section ===== */
.services {
    padding: 100px 24px;
    background: var(--bg-white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.section-header p {
    font-size: 18px;
    color: var(--text-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

.service-card {
    background: var(--bg-white);
    padding: 36px 28px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.service-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.service-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.service-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
}

/* ===== Why NOON Section ===== */
.why-noon {
    padding: 80px 24px;
    background: var(--bg-section);
}

.why-noon .container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.why-item {
    background: var(--bg-white);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
}

.why-item h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.why-item p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.8;
}

/* ===== CTA Banner ===== */
.cta-banner {
    padding: 80px 24px;
    background: var(--gradient-dark);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.cta-banner h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #ffffff;
}

.cta-banner p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 24px;
}

.btn-cta {
    display: inline-block;
    padding: 14px 40px;
    background: var(--text-dark);
    color: var(--bg-white);
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* ===== Contact Section ===== */
.contact {
    padding: 100px 24px;
    background: var(--bg-white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 24px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.contact-item span {
    font-size: 32px;
}

.contact-item h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.contact-item p {
    font-size: 14px;
    color: var(--text-light);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #eee;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition);
    -webkit-appearance: none;
    /* Fix for iOS */
    appearance: none;
    box-shadow: none;
    background: #fff;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-submit {
    padding: 14px 28px;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* ===== Footer ===== */
.footer {
    padding: 60px 24px 100px;
    background: var(--text-dark);
    color: var(--bg-white);
}

.footer-brand {
    max-width: 400px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-logo span {
    color: var(--accent-orange);
}

.footer-brand p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}

/* ===== Mobile Bottom Nav ===== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 8px 0;
}

.mobile-bottom-nav {
    display: none;
    justify-content: space-around;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    font-size: 12px;
    color: var(--text-light);
    transition: var(--transition);
}

.bottom-nav-item span:first-child {
    font-size: 20px;
    margin-bottom: 4px;
}

.bottom-nav-item.active {
    color: var(--accent-orange);
}

/* ===== Floating Contact ===== */
.floating-contact {
    position: fixed;
    bottom: 100px;
    right: 24px;
    z-index: 999;
}

.wechat-popup {
    display: none;
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 140px;
    /* Reduced from 200px */
    background: white;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
    border: 1px solid #eee;
}

.wechat-popup.active {
    display: block;
    animation: fadeInUp 0.3s ease;
}

.wechat-popup img {
    width: 100%;
    margin-bottom: 6px;
    border-radius: 4px;
}

.wechat-popup p {
    font-size: 12px;
    color: #666;
    margin: 0;
    font-weight: 500;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.float-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-orange);
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    outline: none;
    /* Remove default focus outline */
}

.float-btn:focus {
    outline: none;
}

.float-btn:hover {
    transform: scale(1.1);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .why-noon .container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    .nav-desktop,
    .header-actions {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero {
        padding: 120px 20px 60px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .title-main {
        font-size: 32px;
    }

    .title-sub {
        font-size: 18px;
    }

    .hero-description {
        margin: 0 auto 24px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .phone-mockup {
        margin-top: 40px;
    }

    .phone {
        width: 200px;
        height: 400px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .service-card {
        padding: 24px 16px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    .floating-contact {
        bottom: 80px;
    }

    .footer {
        padding-bottom: 80px;
    }
}

@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .cta-banner h2 {
        font-size: 22px;
    }
}

/* ===== Custom Modal ===== */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.custom-modal.active {
    opacity: 1;
    visibility: visible;
}

.custom-modal-content {
    background-color: var(--bg-white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
}

.custom-modal.active .custom-modal-content {
    transform: translateY(0);
}

.custom-modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.custom-modal-text {
    color: var(--text-light);
    margin-bottom: 24px;
    font-size: 16px;
    line-height: 1.5;
}

.custom-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-modal {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 14px;
}

.btn-modal-primary {
    background: #Feee00; /* Noon Yellow */
    color: #000000;
}

.btn-modal-primary:hover {
    background: #FFD000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(254, 238, 0, 0.3);
}

.btn-modal-secondary {
    background: var(--bg-light);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.btn-modal-secondary:hover {
    background: #F1F5F9;
    color: var(--text-dark);
}