*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;color:#334155;background:#fff;line-height:1.6;-webkit-font-smoothing:antialiased}
img{max-width:100%;height:auto;display:block}
a{color:#0369A1;text-decoration:none;transition:color .2s}
a:hover{color:#075985}
.container{max-width:1100px;margin:0 auto;padding:0 24px}

/* Header */
.header{background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.06);position:sticky;top:0;z-index:100}
.header .container{display:flex;align-items:center;justify-content:space-between;height:64px}
.header-logo{display:flex;align-items:center;gap:10px;font-size:1.2rem;font-weight:800;color:#0369A1}
.header-logo svg{width:34px;height:34px}
.nav{display:flex;align-items:center;gap:22px;list-style:none}
.nav a{color:#334155;font-size:.9rem;font-weight:500}
.nav a:hover{color:#0369A1}
.nav-toggle{display:none;background:none;border:none;cursor:pointer;padding:8px}
.nav-toggle svg{width:28px;height:28px;fill:#334155}

/* Hero */
.hero{background:linear-gradient(135deg,#0369A1 0%,#0284C7 50%,#38BDF8 100%);color:#fff;padding:70px 0 80px;text-align:center;position:relative;overflow:hidden}
.hero::after{content:'';position:absolute;bottom:-1px;left:0;width:100%;height:50px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 50'%3E%3Cpath fill='%23ffffff' d='M0,50V25Q360,0,720,25T1440,25V50Z'/%3E%3C/svg%3E");background-size:cover}
.hero h1{font-size:2.6rem;font-weight:800;margin-bottom:14px;letter-spacing:-.02em}
.hero p{font-size:1.1rem;opacity:.92;max-width:520px;margin:0 auto 28px;line-height:1.7}

/* Tool Input */
.tool-box{max-width:600px;margin:0 auto;background:#E0F2FE;border-radius:16px;padding:28px;box-shadow:0 8px 32px rgba(3,105,161,.15)}
.tool-input{display:flex;gap:10px;margin-bottom:16px}
.tool-input input{flex:1;padding:14px 18px;border:2px solid #BAE6FD;border-radius:10px;font-size:1.05rem;font-family:inherit;background:#fff;outline:none;transition:border-color .2s}
.tool-input input:focus{border-color:#0369A1}
.tool-input input::placeholder{color:#94A3B8}
.tool-input button{padding:14px 28px;border:none;border-radius:10px;background:#0369A1;color:#fff;font-size:1rem;font-weight:700;cursor:pointer;transition:background .2s;font-family:inherit;white-space:nowrap}
.tool-input button:hover{background:#075985}
.tool-options{display:flex;gap:16px;flex-wrap:wrap;align-items:center}
.tool-options label{font-size:.85rem;color:#475569;font-weight:500}
.tool-options select,.tool-options input[type="number"]{padding:6px 10px;border:2px solid #BAE6FD;border-radius:6px;font-size:.85rem;font-family:inherit;background:#fff;outline:none}
.tool-options select:focus,.tool-options input[type="number"]:focus{border-color:#0369A1}

/* Results */
.results{max-width:700px;margin:30px auto 0;display:none}
.results.show{display:block}
.results-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
.results-header h3{font-size:1.2rem;font-weight:700;color:#0369A1}
.results-header span{font-size:.88rem;color:#64748B}
.results-group{margin-bottom:24px}
.results-group h4{font-size:.92rem;font-weight:700;color:#475569;margin-bottom:10px;padding-bottom:6px;border-bottom:2px solid #E0F2FE}
.word-chip{display:inline-flex;align-items:center;gap:6px;padding:8px 14px;margin:0 6px 8px 0;background:#fff;border-radius:8px;font-size:.92rem;font-weight:600;color:#0369A1;box-shadow:0 1px 4px rgba(0,0,0,.06);transition:background .2s,transform .15s;cursor:default}
.word-chip:hover{background:#E0F2FE;transform:translateY(-1px)}
.word-chip .pts{font-size:.75rem;font-weight:700;color:#16A34A;background:#DCFCE7;padding:2px 6px;border-radius:4px}
.no-results{text-align:center;padding:30px;color:#64748B;font-size:.95rem}

/* Loading */
.loading{display:none;text-align:center;padding:30px}
.loading.show{display:block}
.loading-dots{display:inline-flex;gap:6px}
.loading-dots span{width:10px;height:10px;border-radius:50%;background:#0369A1;animation:bounce .6s infinite alternate}
.loading-dots span:nth-child(2){animation-delay:.2s}
.loading-dots span:nth-child(3){animation-delay:.4s}
@keyframes bounce{to{opacity:.3;transform:translateY(-8px)}}

/* Section */
.section{padding:60px 0}
.section-alt{background:#F8FAFC}
.section-title{text-align:center;margin-bottom:40px}
.section-title h2{font-size:1.8rem;font-weight:700;color:#0F172A;margin-bottom:10px}
.section-title p{color:#64748B;font-size:1rem;max-width:520px;margin:0 auto}

/* Cards grid */
.cards-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:24px}
.card{background:#fff;border-radius:14px;padding:28px 22px;box-shadow:0 2px 12px rgba(0,0,0,.05);transition:transform .3s,box-shadow .3s}
.card:hover{transform:translateY(-3px);box-shadow:0 8px 24px rgba(3,105,161,.1)}
.card-icon{width:48px;height:48px;display:flex;align-items:center;justify-content:center;border-radius:12px;background:linear-gradient(135deg,#0369A1,#38BDF8);margin-bottom:14px}
.card-icon svg{width:24px;height:24px;fill:#fff}
.card h3{font-size:1.05rem;font-weight:700;color:#0F172A;margin-bottom:6px}
.card p{color:#64748B;font-size:.88rem;line-height:1.6;margin-bottom:14px}
.card .btn-sm{display:inline-block;padding:7px 18px;border-radius:7px;background:#0369A1;color:#fff;font-size:.82rem;font-weight:600;transition:background .2s}
.card .btn-sm:hover{background:#075985;color:#fff}

/* How To */
.how-to{max-width:700px;margin:0 auto}
.how-step{display:flex;gap:18px;margin-bottom:20px;align-items:flex-start}
.how-num{width:40px;height:40px;min-width:40px;border-radius:50%;background:#0369A1;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:1rem}
.how-step h4{font-size:1rem;font-weight:700;color:#0F172A;margin-bottom:4px}
.how-step p{color:#64748B;font-size:.9rem}

/* Example */
.example-box{background:#E0F2FE;border-radius:12px;padding:20px 24px;margin:20px auto;max-width:500px}
.example-box .ex-label{font-size:.78rem;font-weight:700;text-transform:uppercase;color:#0369A1;margin-bottom:6px}
.example-box .ex-input{font-size:1.2rem;font-weight:800;letter-spacing:.12em;color:#0F172A;margin-bottom:8px}
.example-box .ex-arrow{color:#16A34A;font-weight:700;margin-bottom:4px}
.example-box .ex-results{font-size:.95rem;color:#334155}

/* Wordle solver */
.wordle-grid{display:flex;gap:8px;justify-content:center;margin-bottom:20px}
.wordle-cell{width:52px;height:52px;border:2px solid #CBD5E1;border-radius:8px;text-align:center;font-size:1.3rem;font-weight:800;text-transform:uppercase;font-family:inherit;outline:none;transition:border-color .2s}
.wordle-cell:focus{border-color:#0369A1}
.wordle-cell.green{background:#16A34A;border-color:#16A34A;color:#fff}
.wordle-cell.yellow{background:#EAB308;border-color:#EAB308;color:#fff}
.wordle-cell.gray{background:#94A3B8;border-color:#94A3B8;color:#fff}
.color-toggle{display:flex;gap:8px;justify-content:center;margin-bottom:20px;flex-wrap:wrap}
.color-toggle button{padding:6px 14px;border:2px solid #CBD5E1;border-radius:6px;background:#fff;font-size:.82rem;font-weight:600;cursor:pointer;font-family:inherit;transition:all .2s}
.color-toggle button.active-green{background:#16A34A;color:#fff;border-color:#16A34A}
.color-toggle button.active-yellow{background:#EAB308;color:#fff;border-color:#EAB308}
.color-toggle button.active-gray{background:#94A3B8;color:#fff;border-color:#94A3B8}

/* Breadcrumb */
.breadcrumb{padding:14px 0;font-size:.85rem;color:#64748B}
.breadcrumb a{color:#0369A1}
.breadcrumb span{margin:0 6px;color:#ccc}

/* Info page */
.info-page{max-width:760px;margin:0 auto;padding:40px 24px}
.info-page h1{font-size:2rem;font-weight:700;color:#0F172A;margin-bottom:24px}
.info-page h2{font-size:1.3rem;font-weight:700;color:#0F172A;margin:28px 0 12px}
.info-page p,.info-page li{font-size:.95rem;line-height:1.75;margin-bottom:12px;color:#475569}
.info-page ul{padding-left:24px}

/* Tips */
.tip-card{background:#fff;border-radius:14px;padding:24px;margin-bottom:20px;box-shadow:0 2px 10px rgba(0,0,0,.04);border-left:4px solid #0369A1}
.tip-card h3{font-size:1.1rem;font-weight:700;color:#0369A1;margin-bottom:8px}
.tip-card p{color:#475569;font-size:.92rem;line-height:1.65}

/* Ad slot */
.ad-slot{background:#F1F5F9;border:2px dashed #CBD5E1;border-radius:10px;padding:20px;text-align:center;color:#94A3B8;font-size:.85rem}

/* Footer */
.footer{background:#0F172A;color:#CBD5E1;padding:48px 0 0}
.footer-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:28px}
.footer h4{color:#38BDF8;font-size:.9rem;font-weight:700;margin-bottom:12px}
.footer ul{list-style:none}
.footer li{margin-bottom:8px}
.footer a{color:#CBD5E1;font-size:.86rem}
.footer a:hover{color:#38BDF8}
.footer-bottom{text-align:center;padding:22px 0;margin-top:32px;border-top:1px solid rgba(255,255,255,.08);font-size:.8rem;color:#64748B}

/* Responsive */
@media(max-width:768px){
.nav{display:none;position:absolute;top:64px;left:0;right:0;background:#fff;flex-direction:column;padding:20px;gap:14px;box-shadow:0 8px 24px rgba(0,0,0,.1)}
.nav.open{display:flex}
.nav-toggle{display:block}
.hero h1{font-size:1.8rem}
.hero{padding:50px 0 60px}
.tool-input{flex-direction:column}
.tool-options{flex-direction:column;gap:10px}
.footer-grid{grid-template-columns:repeat(2,1fr)}
.cards-grid{grid-template-columns:1fr}
.wordle-cell{width:44px;height:44px;font-size:1.1rem}
}
@media(max-width:480px){
.footer-grid{grid-template-columns:1fr}
}
