*,*::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:#E2E8F0;background:#0F172A;line-height:1.6;-webkit-font-smoothing:antialiased}
img{max-width:100%;height:auto;display:block}
a{color:#06B6D4;text-decoration:none;transition:color .2s}
a:hover{color:#22D3EE}
.container{max-width:1100px;margin:0 auto;padding:0 24px}

/* Header */
.header{background:rgba(15,23,42,.95);backdrop-filter:blur(12px);box-shadow:0 1px 0 rgba(255,255,255,.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:#06B6D4}
.header-logo svg{width:34px;height:34px}
.nav{display:flex;align-items:center;gap:22px;list-style:none}
.nav a{color:#94A3B8;font-size:.9rem;font-weight:500;transition:color .2s}
.nav a:hover{color:#06B6D4}
.nav-toggle{display:none;background:none;border:none;cursor:pointer;padding:8px}
.nav-toggle svg{width:28px;height:28px;fill:#94A3B8}

/* Hero */
.hero{background:linear-gradient(135deg,#0F172A 0%,#1E293B 40%,#0F172A 100%);padding:80px 0 90px;text-align:center;position:relative;overflow:hidden}
.hero::before{content:'';position:absolute;top:-50%;left:-50%;width:200%;height:200%;background:conic-gradient(from 0deg at 50% 50%,transparent 0deg,rgba(6,182,212,.05) 60deg,transparent 120deg,rgba(139,92,246,.05) 180deg,transparent 240deg,rgba(6,182,212,.05) 300deg,transparent 360deg);animation:heroSpin 30s linear infinite}
@keyframes heroSpin{to{transform:rotate(360deg)}}
.hero .container{position:relative;z-index:1}
.hero h1{font-size:2.6rem;font-weight:800;margin-bottom:14px;letter-spacing:-.02em;background:linear-gradient(135deg,#06B6D4,#8B5CF6);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.hero p{font-size:1.1rem;color:#94A3B8;max-width:520px;margin:0 auto 28px;line-height:1.7}
.hero .badge{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;border-radius:20px;background:rgba(6,182,212,.1);border:1px solid rgba(6,182,212,.2);color:#06B6D4;font-size:.78rem;font-weight:600;margin-bottom:20px}
.hero .badge svg{width:14px;height:14px;fill:#06B6D4}

/* Tool Input - Dark */
.tool-box{max-width:600px;margin:0 auto;background:rgba(30,41,59,.8);border:1px solid rgba(255,255,255,.08);border-radius:16px;padding:28px;backdrop-filter:blur(8px)}
.tool-input{display:flex;gap:10px;margin-bottom:16px}
.tool-input input{flex:1;padding:14px 18px;border:2px solid rgba(255,255,255,.1);border-radius:10px;font-size:1.05rem;font-family:inherit;background:rgba(15,23,42,.8);color:#E2E8F0;outline:none;transition:border-color .2s}
.tool-input input:focus{border-color:#06B6D4}
.tool-input input::placeholder{color:#475569}
.tool-input button{padding:14px 28px;border:none;border-radius:10px;background:linear-gradient(135deg,#06B6D4,#8B5CF6);color:#fff;font-size:1rem;font-weight:700;cursor:pointer;transition:opacity .2s;font-family:inherit;white-space:nowrap}
.tool-input button:hover{opacity:.9}
.tool-options{display:flex;gap:16px;flex-wrap:wrap;align-items:center}
.tool-options label{font-size:.85rem;color:#94A3B8;font-weight:500}
.tool-options select,.tool-options input[type="number"]{padding:6px 10px;border:1px solid rgba(255,255,255,.1);border-radius:6px;font-size:.85rem;font-family:inherit;background:#1E293B;color:#E2E8F0;outline:none}

/* 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:#06B6D4}
.results-header span{font-size:.88rem;color:#64748B}
.results-group{margin-bottom:24px}
.results-group h4{font-size:.92rem;font-weight:700;color:#94A3B8;margin-bottom:10px;padding-bottom:6px;border-bottom:1px solid rgba(255,255,255,.06)}
.word-chip{display:inline-flex;align-items:center;gap:6px;padding:8px 14px;margin:0 6px 8px 0;background:rgba(30,41,59,.8);border:1px solid rgba(255,255,255,.06);border-radius:8px;font-size:.92rem;font-weight:600;color:#E2E8F0;transition:border-color .2s,transform .15s;cursor:pointer}
.word-chip:hover{border-color:#06B6D4;transform:translateY(-1px)}
.word-chip .pts{font-size:.75rem;font-weight:700;color:#06B6D4;background:rgba(6,182,212,.1);padding:2px 6px;border-radius:4px}
.word-chip .diff{font-size:.7rem;padding:2px 6px;border-radius:4px;font-weight:600}
.word-chip .diff.easy{background:rgba(34,197,94,.15);color:#4ADE80}
.word-chip .diff.medium{background:rgba(234,179,8,.15);color:#FACC15}
.word-chip .diff.hard{background:rgba(239,68,68,.15);color:#F87171}
.no-results{text-align:center;padding:30px;color:#64748B}

/* AI Panel */
.ai-panel{background:rgba(30,41,59,.6);border:1px solid rgba(139,92,246,.2);border-radius:14px;padding:24px;margin:24px auto;max-width:700px}
.ai-panel-header{display:flex;align-items:center;gap:8px;margin-bottom:14px}
.ai-panel-header svg{width:20px;height:20px;fill:#8B5CF6}
.ai-panel-header h3{font-size:1rem;font-weight:700;color:#8B5CF6}
.ai-insight{padding:12px 0;border-bottom:1px solid rgba(255,255,255,.04)}
.ai-insight:last-child{border-bottom:none}
.ai-insight .label{font-size:.78rem;text-transform:uppercase;letter-spacing:.06em;color:#8B5CF6;font-weight:600;margin-bottom:4px}
.ai-insight p{font-size:.9rem;color:#CBD5E1;line-height:1.6}

/* Loading - AI style */
.loading{display:none;text-align:center;padding:30px}
.loading.show{display:block}
.ai-loading{display:inline-flex;gap:4px;align-items:center}
.ai-loading span{display:inline-block;width:8px;height:8px;border-radius:50%;background:#06B6D4;animation:aiPulse 1.2s infinite}
.ai-loading span:nth-child(2){animation-delay:.2s;background:#8B5CF6}
.ai-loading span:nth-child(3){animation-delay:.4s;background:#06B6D4}
.ai-loading span:nth-child(4){animation-delay:.6s;background:#8B5CF6}
@keyframes aiPulse{0%,100%{opacity:.3;transform:scale(.8)}50%{opacity:1;transform:scale(1.2)}}
.typing-text{color:#94A3B8;font-size:.88rem;margin-top:8px;overflow:hidden;border-right:2px solid #06B6D4;white-space:nowrap;animation:typing 2s steps(30) infinite,blink .7s step-end infinite}
@keyframes typing{0%{width:0}50%{width:14em}100%{width:14em}}
@keyframes blink{50%{border-color:transparent}}

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

/* Cards */
.cards-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:24px}
.card{background:rgba(30,41,59,.6);border:1px solid rgba(255,255,255,.06);border-radius:14px;padding:28px 22px;transition:border-color .3s,transform .3s}
.card:hover{border-color:rgba(6,182,212,.3);transform:translateY(-3px)}
.card-icon{width:48px;height:48px;display:flex;align-items:center;justify-content:center;border-radius:12px;background:linear-gradient(135deg,#06B6D4,#8B5CF6);margin-bottom:14px}
.card-icon svg{width:24px;height:24px;fill:#fff}
.card h3{font-size:1.05rem;font-weight:700;color:#E2E8F0;margin-bottom:6px}
.card p{color:#94A3B8;font-size:.88rem;line-height:1.6;margin-bottom:14px}
.card .btn-sm{display:inline-block;padding:7px 18px;border-radius:7px;background:linear-gradient(135deg,#06B6D4,#8B5CF6);color:#fff;font-size:.82rem;font-weight:600;transition:opacity .2s}
.card .btn-sm:hover{opacity:.9;color:#fff}

/* Wordle cells dark */
.wordle-grid{display:flex;gap:8px;justify-content:center;margin-bottom:20px}
.wordle-cell{width:52px;height:52px;border:2px solid rgba(255,255,255,.15);border-radius:8px;text-align:center;font-size:1.3rem;font-weight:800;text-transform:uppercase;font-family:inherit;outline:none;background:rgba(15,23,42,.8);color:#E2E8F0;transition:border-color .2s}
.wordle-cell:focus{border-color:#06B6D4}
.wordle-cell.green{background:#16A34A;border-color:#16A34A}
.wordle-cell.yellow{background:#EAB308;border-color:#EAB308}
.wordle-cell.gray{background:#475569;border-color:#475569}
.color-toggle{display:flex;gap:8px;justify-content:center;margin-bottom:20px;flex-wrap:wrap}
.color-toggle button{padding:6px 14px;border:1px solid rgba(255,255,255,.15);border-radius:6px;background:transparent;color:#94A3B8;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:#475569;color:#fff;border-color:#475569}

/* Crossword pattern input */
.pattern-input{display:flex;gap:6px;justify-content:center;margin-bottom:20px}
.pattern-cell{width:46px;height:46px;border:2px solid rgba(255,255,255,.15);border-radius:8px;text-align:center;font-size:1.2rem;font-weight:800;text-transform:uppercase;font-family:inherit;outline:none;background:rgba(15,23,42,.8);color:#E2E8F0;transition:border-color .2s}
.pattern-cell:focus{border-color:#8B5CF6}

/* Word of the Day */
.wotd-card{background:rgba(30,41,59,.6);border:1px solid rgba(139,92,246,.2);border-radius:16px;padding:30px;max-width:600px;margin:0 auto}
.wotd-card .wotd-label{font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:#8B5CF6;margin-bottom:8px}
.wotd-card h3{font-size:1.6rem;font-weight:800;color:#E2E8F0;margin-bottom:4px}
.wotd-card .wotd-pron{font-size:.9rem;color:#64748B;font-style:italic;margin-bottom:12px}
.wotd-card .wotd-def{font-size:1rem;color:#CBD5E1;margin-bottom:12px}
.wotd-detail{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}
.wotd-detail-item{background:rgba(15,23,42,.5);border-radius:10px;padding:14px}
.wotd-detail-item .label{font-size:.75rem;text-transform:uppercase;color:#8B5CF6;font-weight:600;margin-bottom:4px}
.wotd-detail-item p{font-size:.88rem;color:#CBD5E1}

/* Breadcrumb */
.breadcrumb{padding:14px 0;font-size:.85rem;color:#64748B}
.breadcrumb a{color:#06B6D4}
.breadcrumb span{margin:0 6px;color:rgba(255,255,255,.15)}

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

/* Ad slot */
.ad-slot{background:rgba(30,41,59,.4);border:2px dashed rgba(255,255,255,.08);border-radius:10px;padding:20px;text-align:center;color:#475569;font-size:.85rem}

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

/* Responsive */
@media(max-width:768px){
.nav{display:none;position:absolute;top:64px;left:0;right:0;background:rgba(15,23,42,.98);flex-direction:column;padding:20px;gap:14px;box-shadow:0 8px 24px rgba(0,0,0,.3)}
.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,.pattern-cell{width:44px;height:44px;font-size:1.1rem}
.wotd-detail{grid-template-columns:1fr}
}
@media(max-width:480px){.footer-grid{grid-template-columns:1fr}}
