/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: #f4f7fc;
    color: #0f1a2b;
    line-height: 1.6;
    min-height: 100vh;
}

#app {
    max-width: 600px;
    margin: 0 auto;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(0,0,0,0.08);
}

/* ===== HEADER ===== */
header {
    background: linear-gradient(135deg, #0f1a2b, #1a2a3a);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid #2a3a4a;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon { font-size: 24px; }

header h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.version-badge {
    background: #2a9d8f;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    color: white;
}

.install-btn {
    background: rgba(255,255,255,0.12);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: none;
    transition: background 0.2s;
}

.install-btn:hover { background: rgba(255,255,255,0.2); }

/* ===== MAIN CONTENT ===== */
main {
    flex: 1;
    padding: 16px 20px 80px;
    overflow-y: auto;
}

.page { display: none; animation: fadeIn 0.3s ease; }
.page.active { display: block; }

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

/* ===== HERO ===== */
.hero-section {
    background: linear-gradient(135deg, #e8f0fe, #d4e4f7);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
}

.hero-section h2 {
    font-size: 22px;
    color: #0f1a2b;
    margin-bottom: 6px;
}

.hero-section p {
    color: #2a3a4a;
    font-size: 14px;
    margin-bottom: 16px;
}

.btn-primary {
    display: inline-block;
    background: #0f1a2b;
    color: white;
    padding: 10px 28px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover { background: #1a2a3a; }
.btn-primary:active { transform: scale(0.97); }

.btn-outline {
    display: inline-block;
    background: transparent;
    color: #0f1a2b;
    padding: 8px 24px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border: 2px solid #0f1a2b;
    transition: background 0.2s;
}

.btn-outline:hover { background: #e8f0fe; }

/* ===== STATS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.stat-card {
    background: #f8fafc;
    padding: 14px 8px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #eef2f6;
}

.stat-card .number {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #0f1a2b;
}

.stat-card .label {
    font-size: 11px;
    color: #5a6a7a;
}

/* ===== TRUSTED SECTION ===== */
.trusted-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    border: 1px solid #eef2f6;
}

.trusted-label {
    font-weight: 600;
    font-size: 14px;
    color: #0f1a2b;
    margin-bottom: 10px;
    text-align: center;
}

.industry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.industry-tags span {
    background: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    border: 1px solid #e0e6ed;
    color: #2a3a4a;
}

/* ===== SECTION TITLE ===== */
.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f1a2b;
    margin: 24px 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== SERVICES GRID ===== */
.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 10px;
}

.service-card {
    background: #f8fafc;
    border-radius: 14px;
    padding: 16px 14px;
    border: 1px solid #eef2f6;
    transition: transform 0.15s, box-shadow 0.15s;
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.service-card .icon { font-size: 28px; display: block; margin-bottom: 4px; }
.service-card h3 { font-size: 14px; font-weight: 700; color: #0f1a2b; }
.service-card p { font-size: 12px; color: #5a6a7a; margin: 4px 0 10px; }
.service-link {
    font-size: 12px;
    font-weight: 600;
    color: #2a9d8f;
    text-decoration: none;
}
.service-link:hover { text-decoration: underline; }

.new-badge {
    background: #e67e22;
    color: white;
    font-size: 8px;
    padding: 1px 8px;
    border-radius: 12px;
    vertical-align: middle;
    margin-left: 4px;
}

/* ===== PRICING ===== */
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.pricing-card {
    background: #f8fafc;
    border-radius: 14px;
    padding: 16px;
    border: 1px solid #eef2f6;
    text-align: center;
}

.pricing-card.featured {
    border-color: #2a9d8f;
    background: #f0faf8;
}

.pricing-card h3 { font-size: 14px; font-weight: 700; }
.pricing-card .price { font-size: 22px; font-weight: 700; margin: 6px 0; }
.pricing-card .price span { font-size: 12px; font-weight: 400; color: #5a6a7a; }
.pricing-card ul { list-style: none; font-size: 11px; text-align: left; margin: 10px 0; }
.pricing-card ul li { padding: 3px 0; color: #2a3a4a; }
.pricing-card .btn-primary, .pricing-card .btn-outline {
    width: 100%;
    text-align: center;
    padding: 8px;
    font-size: 13px;
}

/* ===== ABOUT PAGE ===== */
.about-content p { margin-bottom: 12px; color: #2a3a4a; }
.about-content h3 {
    font-size: 16px;
    color: #0f1a2b;
    margin: 16px 0 8px;
}

.feature-list {
    list-style: none;
    padding: 0;
}
.feature-list li {
    padding: 8px 12px;
    background: #f8fafc;
    margin-bottom: 6px;
    border-radius: 8px;
    font-size: 13px;
    border-left: 3px solid #2a9d8f;
}
.feature-list li strong { color: #0f1a2b; }

/* ===== SERVICES DETAIL ===== */
.detail-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #eef2f6;
}

.detail-card h3 { font-size: 15px; color: #0f1a2b; margin-bottom: 8px; }
.detail-card ul { list-style: none; font-size: 13px; }
.detail-card ul li { padding: 4px 0; color: #2a3a4a; border-bottom: 1px solid #eef2f6; }
.detail-card ul li:last-child { border-bottom: none; }

/* ===== CONTACT PAGE ===== */
.contact-content p { margin-bottom: 16px; color: #2a3a4a; }
.contact-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #eef2f6;
    align-items: flex-start;
}
.contact-item span { font-size: 22px; }
.contact-item strong { display: block; font-size: 14px; }
.contact-item p { margin: 0; font-size: 13px; color: #5a6a7a; }
.contact-item a { color: #2a9d8f; text-decoration: none; }
.contact-item a:hover { text-decoration: underline; }

/* ===== BOTTOM NAVIGATION ===== */
nav {
    background: white;
    border-top: 1px solid #eef2f6;
    display: flex;
    padding: 6px 8px 10px;
    gap: 4px;
    position: fixed;
    bottom: 0;
    max-width: 600px;
    width: 100%;
    z-index: 10;
}

.nav-btn {
    flex: 1;
    padding: 8px 4px;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #5a6a7a;
    transition: background 0.2s, color 0.2s;
}

.nav-btn:hover { background: #f0f4f8; }
.nav-btn.active {
    background: #e8f0fe;
    color: #0f1a2b;
    font-weight: 600;
}

/* ===== OFFLINE STATUS ===== */
body.offline::before {
    content: '⚠️ You are offline';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #e74c3c;
    color: white;
    text-align: center;
    padding: 6px;
    font-size: 13px;
    font-weight: 500;
    z-index: 999;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .services-grid { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr 1fr; }
    .hero-section h2 { font-size: 20px; }
}

@media (min-width: 601px) {
    nav { position: sticky; bottom: 0; }
    main { padding-bottom: 20px; }
}

/* ===== DARK MODE ===== */
@media (prefers-color-scheme: dark) {
    body { background: #0a121f; }
    #app { background: #111e2e; }
    header { background: linear-gradient(135deg, #0a121f, #111e2e); }
    .hero-section { background: linear-gradient(135deg, #1a2a3a, #0f1a2b); }
    .hero-section h2 { color: #e8f0fe; }
    .hero-section p { color: #8a9aaa; }
    .stat-card, .trusted-section, .service-card, .pricing-card, .detail-card { background: #1a2a3a; border-color: #2a3a4a; }
    .stat-card .number { color: #e8f0fe; }
    .stat-card .label { color: #8a9aaa; }
    .section-title, .pricing-card h3, .about-content h3, .detail-card h3 { color: #e8f0fe; }
    .service-card h3 { color: #e8f0fe; }
    .service-card p { color: #8a9aaa; }
    .pricing-card .price { color: #e8f0fe; }
    .pricing-card ul li { color: #8a9aaa; }
    .pricing-card.featured { background: #1a2a3a; border-color: #2a9d8f; }
    .btn-primary { background: #2a9d8f; }
    .btn-primary:hover { background: #21867a; }
    .btn-outline { color: #e8f0fe; border-color: #e8f0fe; }
    .btn-outline:hover { background: #1a2a3a; }
    .industry-tags span { background: #1a2a3a; color: #8a9aaa; border-color: #2a3a4a; }
    .feature-list li { background: #1a2a3a; border-left-color: #2a9d8f; }
    .feature-list li strong { color: #e8f0fe; }
    .detail-card ul li { color: #8a9aaa; border-bottom-color: #2a3a4a; }
    .contact-item { border-bottom-color: #2a3a4a; }
    .contact-item p { color: #8a9aaa; }
    .contact-item a { color: #2a9d8f; }
    nav { background: #111e2e; border-top-color: #2a3a4a; }
    .nav-btn { color: #8a9aaa; }
    .nav-btn:hover { background: #1a2a3a; }
    .nav-btn.active { background: #1a2a3a; color: #e8f0fe; }
    .about-content p { color: #8a9aaa; }
    .contact-content p { color: #8a9aaa; }
    .trusted-label { color: #e8f0fe; }
}