/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #fff;
    color: #1a1a2e;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.page { min-height: 100vh; display: flex; flex-direction: column; }

/* === Nav === */
.nav {
    position: fixed; top: 0; left: 0; right: 0;
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,.06);
    z-index: 100;
}
.nav-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; height: 64px;
}
.nav-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-text sup { font-size: 12px; vertical-align: super; margin-left: 1px; position: relative; top: -4px; color: #e53e3e; }
.logo-text { font-size: 20px; font-weight: 700; color: #e53e3e; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.lang-switch { display: flex; gap: 4px; }
.lang-switch a {
    padding: 4px 10px; border-radius: 6px; font-size: 13px;
    color: #666; text-decoration: none; transition: all .2s;
}
.lang-switch a:hover { background: #f0f0f5; }
.lang-switch a.active { background: #1a1a2e; color: #fff; }
.lang-switch a.nav-home { margin-right: 8px; }

/* === Buttons === */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 24px; border-radius: 8px; font-size: 14px; font-weight: 600;
    cursor: pointer; border: none; text-decoration: none;
    transition: all .2s; line-height: 1.4;
}
.btn-primary { background: #1a1a2e; color: #fff; }
.btn-primary:hover { background: #2d2d4a; transform: translateY(-1px); }
.btn-outline { background: transparent; color: #1a1a2e; border: 2px solid #1a1a2e; }
.btn-outline:hover { background: #1a1a2e; color: #fff; }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: 10px; }

/* === Hero === */
.hero {
    position: relative; min-height: 50vh;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; padding: 80px 0 40px;
}
.hero-bg {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf3 50%, #f0f4ff 100%);
}
.hero-content {
    position: relative; text-align: center;
    max-width: 800px; padding: 0 24px;
}
.hero-title {
    font-size: clamp(32px, 4.5vw, 56px); font-weight: 800;
    line-height: 1.15; letter-spacing: -0.02em;
    margin-bottom: 28px; color: #1a1a2e;
}
.hero-subtitle {
    font-size: clamp(16px, 2vw, 20px); color: #555;
    margin-bottom: 32px; max-width: 720px; margin-left: auto; margin-right: auto;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 24px; flex-wrap: wrap; }
.hero-trust { color: #888; font-size: 14px; }

/* === Section === */
.section { padding: 80px 0; }
.section-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-title {
    text-align: center; font-size: clamp(28px, 3.5vw, 40px); font-weight: 700;
    margin-bottom: 16px; color: #1a1a2e;
}
.section-subtitle { text-align: center; color: #666; font-size: 16px; margin-bottom: 40px; }

/* === Model Cards === */
.model-cards {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
    margin-top: 40px;
}
.model-card {
    background: #fff; border: 1px solid #e8e8ef; border-radius: 16px;
    padding: 32px; text-align: center;
    transition: all .3s; position: relative;
}
.model-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,.08); }
.card-free { border-color: #1a1a2e; }
.model-tag {
    display: inline-block; padding: 4px 12px; border-radius: 20px;
    font-size: 12px; font-weight: 600; margin-bottom: 16px;
}
.tag-balanced { background: #e8f4fd; color: #1a73e8; }
.tag-flagship { background: #1a1a2e; color: #fff; }
.tag-free { background: #fff5f5; color: #e53e3e; }
.model-name { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.model-context { font-size: 14px; color: #666; margin-bottom: 8px; }
.model-specs { font-size: 14px; color: #666; margin-bottom: 16px; }
.model-price { margin-bottom: 12px; }
.price-num { font-size: 32px; font-weight: 800; color: #1a1a2e; }
.price-unit { font-size: 14px; color: #888; margin-left: 4px; }
.model-desc { font-size: 14px; color: #777; }

/* === Features === */
.features-section {
    position: relative;
    background: linear-gradient(135deg, #080818 0%, #0d1a2d 40%, #0a0a1e 100%);
    overflow: hidden;
}
.features-title { color: #e8e8f0; }

.network-bg {
    position: absolute; inset: 0;
    pointer-events: none; z-index: 0;
}
.network-node {
    position: absolute;
    width: 6px; height: 6px;
    background: #4fc3f7;
    border-radius: 50%;
    box-shadow: 0 0 8px #4fc3f7, 0 0 20px rgba(79,195,247,.3);
    animation: pulse-node 3s ease-in-out infinite;
}
.network-node::after {
    content: ''; position: absolute;
    top: -4px; left: -4px;
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(79,195,247,.15);
    animation: ripple-node 3s ease-in-out infinite;
}
.node-active {
    width: 10px; height: 10px;
    background: #7c4dff;
    box-shadow: 0 0 12px #7c4dff, 0 0 30px rgba(124,77,255,.4);
    animation: pulse-node 2s ease-in-out infinite;
}
.node-active::after {
    top: -6px; left: -6px;
    width: 22px; height: 22px;
    border-color: rgba(124,77,255,.2);
}

.network-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, rgba(79,195,247,.3), transparent);
    transform-origin: left center;
    opacity: .5;
}
.network-line:nth-child(12) { background: linear-gradient(90deg, rgba(124,77,255,.3), transparent); }
.network-line:nth-child(13) { background: linear-gradient(90deg, rgba(124,77,255,.3), transparent); }
.network-line:nth-child(14) { background: linear-gradient(90deg, rgba(124,77,255,.25), transparent); }

@keyframes pulse-node {
    0%, 100% { opacity: .7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}
@keyframes ripple-node {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: .3; }
}

.feature-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
    margin-top: 40px; position: relative; z-index: 1;
}
.feature-card {
    background: rgba(255,255,255,.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px; padding: 32px 24px;
    text-align: center; border: 1px solid rgba(255,255,255,.08);
    transition: all .3s;
}
.feature-card:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,.1);
    border-color: rgba(79,195,247,.2);
    box-shadow: 0 8px 32px rgba(79,195,247,.08);
}
.feature-icon { font-size: 36px; margin-bottom: 16px; }
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: #e8e8f0; }
.feature-card p { font-size: 14px; color: #999; }

/* === Code Section === */
.code-section { background: #fff; }
.code-block {
    max-width: 680px; margin: 0 auto;
    background: #1a1a2e; border-radius: 12px; overflow: hidden;
}
.code-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 20px; background: rgba(255,255,255,.05);
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.code-header span { color: #ccc; font-size: 13px; font-weight: 600; }
.btn-copy {
    background: transparent; border: 1px solid rgba(255,255,255,.2);
    color: #ccc; padding: 4px 12px; border-radius: 6px;
    font-size: 12px; cursor: pointer; transition: all .2s;
}
.btn-copy:hover { background: rgba(255,255,255,.1); }
.code-block pre { padding: 20px; overflow-x: auto; margin: 0; }
.code-block code { color: #e8e8ef; font-size: 14px; line-height: 1.7; font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; }

/* === Pricing === */
.pricing-section { background: #f8f9fc; }
.pricing-cards {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
    max-width: 1000px; margin: 40px auto 0;
}
.pricing-card {
    background: #fff; border: 1px solid #e8e8ef; border-radius: 16px;
    padding: 40px 32px; text-align: center;
}
.pricing-card.card-flagship { border-color: #1a1a2e; }
.pricing-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.pricing-model { font-size: 13px; color: #888; margin-bottom: 2px; font-weight: 500; }
.pricing-context { font-size: 13px; color: #888; margin-bottom: 16px; font-weight: 500; }
.pricing-amount { font-size: 48px; font-weight: 800; color: #1a1a2e; }
.pricing-original { font-size: 48px; font-weight: 400; color: #e53e3e; text-decoration: line-through; }
.pricing-free-date { color: #e53e3e; font-size: 16px; font-weight: 600; margin-top: 4px; }
.pricing-promo { color: #e53e3e; font-size: 14px; font-weight: 600; margin: 12px 0 24px; }
.pricing-amount-free { color: #e53e3e; }
.pricing-title-free { color: #1a1a2e; }
.pricing-billing { margin: 12px 0 24px; }
.billing-row { font-size: 14px; color: #666; padding: 4px 0; }
.billing-row.best { color: #e53e3e; font-weight: 600; }
.pricing-unit { font-size: 16px; font-weight: 400; color: #888; margin-left: 4px; }
.pricing-features { list-style: none; margin-bottom: 24px; }
.pricing-features li {
    padding: 8px 0; border-bottom: 1px solid #f0f0f5;
    color: #555; font-size: 14px;
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-note { text-align: center; margin-top: 24px; font-size: 13px; color: #e53e3e; max-width: 800px; margin-left: auto; margin-right: auto; line-height: 1.6; }

/* === Legal Pages === */
.legal-page { max-width: 800px; margin: 100px auto 60px; padding: 0 24px; color: #333; font-size: 15px; line-height: 1.8; }
.legal-page h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; color: #1a1a2e; }
.legal-page .update-date { color: #888; font-size: 14px; margin-bottom: 32px; }
.legal-page h2 { font-size: 20px; font-weight: 700; margin: 32px 0 12px; color: #1a1a2e; }
.legal-page h3 { font-size: 16px; font-weight: 600; margin: 20px 0 8px; color: #1a1a2e; }
.legal-page p { margin-bottom: 12px; }
.legal-page ul { padding-left: 20px; margin-bottom: 12px; }
.legal-page li { margin-bottom: 6px; }
.legal-page a { color: #1a73e8; }

/* === Footer === */
.footer {
    background: #1a1a2e; color: #999; padding: 48px 0 0;
    margin-top: auto;
}
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.footer-grid {
    display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px;
    padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { font-size: 14px; font-weight: 700; color: #e8e8f0; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .5px; }
.footer-brand h4 { font-size: 18px; text-transform: none; letter-spacing: 0; color: #e53e3e; margin-bottom: 8px; }
.footer-brand h4 sup { font-size: 10px; color: #e53e3e; margin-left: 1px; }
.footer-tagline { font-size: 13px; color: #777; line-height: 1.5; max-width: 240px; margin-bottom: 12px; }
.footer-icp { font-size: 12px; }
.footer-icp a { color: #999; text-decoration: none; transition: color .2s; }
.footer-icp a:hover { color: #e8e8f0; }
.footer-col a { color: #999; text-decoration: none; font-size: 14px; transition: color .2s; }
.footer-col a:hover { color: #e8e8f0; }
.footer-bottom { text-align: center; padding: 24px 0; }
.footer-bottom p { font-size: 12px; margin: 4px 0; }

/* === Modal === */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    display: none; align-items: center; justify-content: center;
    z-index: 200;
}
.modal-content {
    background: #fff; border-radius: 16px; padding: 40px 32px 32px;
    width: 100%; max-width: 420px; position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.15);
}
.modal-close {
    position: absolute; top: 12px; right: 16px;
    background: none; border: none; font-size: 24px;
    cursor: pointer; color: #999;
}
.auth-tabs { display: flex; margin-bottom: 24px; border-bottom: 2px solid #eee; }
.auth-tab {
    flex: 1; padding: 12px; text-align: center; font-size: 16px;
    font-weight: 600; background: none; border: none; cursor: pointer;
    color: #999; border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: all .2s;
}
.auth-tab.active { color: #1a1a2e; border-bottom-color: #1a1a2e; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form input {
    width: 100%; padding: 12px 16px; border: 1px solid #ddd;
    border-radius: 8px; font-size: 14px; transition: border-color .2s;
    margin: 4px 0;
}
.auth-form input:focus { outline: none; border-color: #1a1a2e; }
.auth-form button[type="submit"] {
    padding: 12px; background: #1a1a2e; color: #fff;
    border: none; border-radius: 8px; font-size: 15px; font-weight: 600;
    cursor: pointer; transition: all .2s; width: 100%; margin: 8px 0;
}
.auth-form button[type="submit"]:hover { background: #2d2d4a; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.code-row button {
    white-space: nowrap; padding: 12px 16px;
    background: #f0f0f5; border: 1px solid #ddd;
    border-radius: 8px; font-size: 13px; cursor: pointer; font-weight: 600;
    margin: 4px 0;
}
.code-row button:disabled { opacity: .5; cursor: not-allowed; }
.auth-switch { text-align: center; color: #1a73e8; font-size: 13px; cursor: pointer; }
.auth-switch:hover { text-decoration: underline; }
.auth-error {
    background: #fff5f5; color: #e53e3e; padding: 12px;
    border-radius: 8px; font-size: 13px; margin-top: 12px; text-align: center;
}

/* === Responsive === */
@media (max-width: 1024px) {
    .model-cards { grid-template-columns: repeat(2, 1fr); }
    .pricing-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-inner { padding: 0 12px; height: 56px; }
    .nav-right { gap: 8px; }
    .lang-switch a { padding: 4px 6px; font-size: 12px; }
    .btn { padding: 8px 16px; font-size: 13px; }
    .nav .btn-primary { display: none; }
    .hero { min-height: 40vh; padding: 80px 0 24px; }
    .hero-title { font-size: 28px; white-space: normal; }
    .hero-subtitle { font-size: 15px; }
    .btn-lg { padding: 12px 24px; font-size: 15px; }
    .section { padding: 48px 0; }
    .section-title { font-size: 26px; }
    .model-cards { grid-template-columns: 1fr; }
    .models-section .section-title { display: none; }
    .model-card { padding: 24px; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .feature-card { padding: 24px 16px; }
    .pricing-cards { grid-template-columns: 1fr; }
    .pricing-card { padding: 32px 20px; }
    .pricing-amount { font-size: 36px; }
    .pricing-card h3 { font-size: 18px; }
    .code-block pre { padding: 16px; }
    .code-block code { font-size: 13px; }
    .network-bg { display: none; }
    .modal-content { padding: 32px 20px 24px; margin: 0 16px; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 24px; }
    .feature-grid { grid-template-columns: 1fr; }
    .pricing-card { padding: 24px 16px; }
    .pricing-amount { font-size: 32px; }
    .logo-text { font-size: 18px; }
    .code-row { flex-direction: column; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .footer-col { align-items: center; text-align: center; }
    .footer-tagline { max-width: 100%; }
    .footer-icp { text-align: center; }
}
