/* =========================
   WORD FINDER DESIGN SYSTEM
   Slate + Cobalt Theme
========================= */

:root{

--bg:#EEF3F8;
--panel:#FFFFFF;
--card:#F8FAFC;

--primary:#2563EB;
--primary-hover:#1D4ED8;
--accent:#60A5FA;

--text:#1E293B;
--muted:#64748B;

--border:#D6DEE8;

--green:#6AAA64;
--yellow:#C9B458;
--gray:#8B949E;

--shadow:0 10px 30px rgba(30,41,59,.08);

}

/* =========================
   DARK MODE VARIABLES
========================= */

body.dark-mode{

--bg:#0F172A;
--panel:#1E293B;
--card:#263449;

--text:#F1F5F9;
--muted:#94A3B8;

--border:#334155;

--primary:#3B82F6;
--primary-hover:#60A5FA;
--accent:#60A5FA;

--shadow:0 10px 30px rgba(0,0,0,.30);

}

/* =========================
   GLOBAL
========================= */

*{
box-sizing:border-box;
margin:0;
padding:0;
}

html{
transition:background-color .25s;
}

body{
background:var(--bg);
font-family:Inter,Arial,sans-serif;
color:var(--text);
padding:24px;
transition:
background-color .25s,
color .25s;
}

/* =========================
   HEADER
========================= */

.wf-header{
max-width:1280px;
margin:auto auto 24px;
display:flex;
justify-content:space-between;
align-items:center;
gap:20px;
}

.brand{
display:flex;
align-items:center;
gap:16px;
}

.logo-box{
width:52px;
height:52px;
border-radius:14px;
background:var(--primary);
color:white;
display:flex;
align-items:center;
justify-content:center;
font-size:1.8rem;
font-weight:700;
}

.brand h1{
font-size:2rem;
margin-bottom:4px;
}

.brand p{
color:var(--muted);
}

.header-actions{
display:flex;
gap:12px;
}

/* =========================
   LAYOUT
========================= */

.wf-container{
max-width:1280px;
margin:auto;
display:grid;
grid-template-columns:420px 1fr;
gap:24px;
align-items:start;
}

.wf-panel{
background:var(--panel);
border:1px solid var(--border);
border-radius:24px;
padding:32px;
box-shadow:var(--shadow);
transition:
background-color .25s,
border-color .25s,
box-shadow .25s;
}

/* =========================
   INTRO & SEO CONTENT
========================= */

.intro-section,
.seo-content{
max-width:1280px;
margin:32px auto 0;
background:var(--panel);
border:1px solid var(--border);
border-radius:24px;
padding:32px;
box-shadow:var(--shadow);
transition:
background-color .25s,
border-color .25s,
box-shadow .25s;
}

.intro-section{
margin-bottom:24px;
text-align:center;
}

.intro-section p{
max-width:760px;
margin:auto;
font-size:1.08rem;
line-height:1.7;
color:var(--muted);
}

.seo-content section{
margin-bottom:42px;
}

.seo-content section:last-child{
margin-bottom:0;
}

.seo-content h2{
font-size:1.7rem;
margin-bottom:16px;
color:var(--text);
}

.seo-content h3{
font-size:1.2rem;
margin:24px 0 10px;
color:var(--text);
}

.seo-content p{
line-height:1.8;
margin-bottom:16px;
color:var(--text);
}

.seo-content ul,
.seo-content ol{
margin:16px 0 16px 22px;
line-height:1.8;
}

.seo-content li{
margin-bottom:8px;
}

.seo-content strong{
color:var(--text);
}

.seo-content hr{
border:none;
height:1px;
background:var(--border);
margin:36px 0;
}

/* =========================
   FAQ ACCORDION - UPDATED
========================= */

#faqs {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--border);
}

#faqs h2 {
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(37,99,235,.08);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  cursor: pointer;
  background: var(--card);
  transition: background 0.2s ease;
  user-select: none;
  gap: 1rem;
}

.faq-question:hover {
  background: var(--bg);
}

.faq-question span {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  flex: 1;
}

.faq-toggle {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-family: Inter, Arial, sans-serif;
}

.faq-toggle:hover {
  background: var(--primary);
  color: white;
  transform: rotate(90deg);
}

.faq-item.active .faq-toggle {
  transform: rotate(45deg);
  background: var(--primary);
  color: white;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 1.25rem;
  background: var(--panel);
}

.faq-answer p {
  margin: 0;
  padding: 0 0 1.25rem 0;
  color: var(--text);
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 1.25rem;
}

/* Dark Mode FAQ */
body.dark-mode #faqs h2 {
  color: #F1F5F9;
}

body.dark-mode .faq-item {
  border-color: #334155;
  background: #1E293B;
}

body.dark-mode .faq-item:hover {
  border-color: #3B82F6;
  box-shadow: 0 4px 12px rgba(59,130,246,.15);
}

body.dark-mode .faq-question {
  background: #1E293B;
}

body.dark-mode .faq-question:hover {
  background: #263449;
}

body.dark-mode .faq-question span {
  color: #F1F5F9;
}

body.dark-mode .faq-answer {
  background: #0F172A;
}

body.dark-mode .faq-answer p {
  color: #CBD5E1;
}

body.dark-mode .faq-toggle {
  border-color: #3B82F6;
  color: #3B82F6;
}

body.dark-mode .faq-toggle:hover {
  background: #3B82F6;
  color: #0F172A;
}

body.dark-mode .faq-item.active .faq-toggle {
  background: #3B82F6;
  color: #0F172A;
}

/* Responsive FAQ */
@media (max-width: 640px) {
  #faqs h2 {
    font-size: 1.4rem;
  }
  
  .faq-question {
    padding: 0.75rem 1rem;
  }
  
  .faq-question span {
    font-size: 0.9rem;
  }
  
  .faq-toggle {
    width: 26px;
    height: 26px;
    font-size: 1.1rem;
  }
  
  .faq-answer p {
    font-size: 0.9rem;
  }
  
  .faq-item.active .faq-answer {
    padding: 0 1rem;
  }
  
  .faq-answer {
    padding: 0 1rem;
  }
}

/* =========================
   TYPOGRAPHY
========================= */

.wf-section{
margin-bottom:28px;
}

h3{
margin-bottom:10px;
font-size:1.08rem;
}

.hint{
color:var(--muted);
font-size:.9rem;
margin-bottom:12px;
line-height:1.4;
}

/* =========================
   INPUT TILES
========================= */

.tile-row{
display:flex;
gap:10px;
}

.tile-row input{
width:64px;
height:64px;
border:none;
border-radius:8px;
text-align:center;
font-size:2rem;
font-weight:700;
text-transform:uppercase;
color:white;
outline:none;
transition:.18s;
}

.tile-row input:focus{
box-shadow:0 0 0 3px rgba(37,99,235,.20);
transform:translateY(-1px);
}

.green input{
background:var(--green);
}

.yellow input{
background:var(--yellow);
}

.multi-yellow input{
font-size:1rem;
letter-spacing:2px;
padding:0 4px;
}

/* =========================
   EXCLUDED
========================= */

.excluded-input{
width:100%;
height:52px;
background:var(--gray);
color:white;
border:none;
border-radius:8px;
padding:0 16px;
font-size:1.15rem;
text-transform:uppercase;
outline:none;
transition:.18s;
}

.excluded-input:focus{
box-shadow:0 0 0 3px rgba(37,99,235,.20);
}

/* =========================
   BEGIN / END FILTERS
========================= */

.future-row{
display:grid;
grid-template-columns:1fr 1fr;
gap:16px;
}

.future-row label{
display:block;
font-size:.9rem;
margin-bottom:6px;
font-weight:600;
}

.future-input{
width:100%;
height:46px;
padding:0 14px;
border:1px solid var(--border);
border-radius:8px;
background:var(--panel);
color:var(--text);
font-size:.95rem;
outline:none;
transition:.18s;
}

.future-input::placeholder{
color:var(--muted);
}

.future-input:focus{
border-color:var(--primary);
box-shadow:0 0 0 3px rgba(37,99,235,.15);
}

/* =========================
   ACTION BUTTONS
========================= */

.action-row{
display:flex;
gap:12px;
margin-top:24px;
}

.action-btn,
.secondary-btn{
height:46px;
border-radius:10px;
padding:0 18px;
font-weight:600;
cursor:pointer;
transition:.18s;
}

.action-btn{
background:var(--primary);
color:white;
border:none;
}

.action-btn:hover{
background:var(--primary-hover);
}

.large-btn{
flex:1;
}

.secondary-btn{
background:var(--panel);
border:1px solid var(--border);
color:var(--text);
}

.secondary-btn:hover{
border-color:var(--primary);
color:var(--primary);
}

/* =========================
   RESULTS
========================= */

.results-header{
margin-bottom:22px;
}

.results-header h2{
font-size:1.55rem;
margin-bottom:6px;
}

#resultCount{
color:var(--muted);
}

.results-grid{
display:grid;
grid-template-columns:1fr;
gap:28px;
padding-right:0;
}

/* =========================
   RESULT SECTIONS
========================= */

.results-section{
width:100%;
min-width:0;
}

.results-section-heading{
display:flex;
align-items:center;
justify-content:space-between;
margin-bottom:14px;
padding-bottom:10px;
border-bottom:1px solid var(--border);
}

.results-section-heading > div{
display:flex;
align-items:center;
gap:10px;
}

.results-section-heading h3{
margin:0;
font-size:1.05rem;
}

.results-section-heading span{
font-size:.82rem;
font-weight:600;
color:var(--muted);
background:var(--bg);
padding:4px 9px;
border-radius:20px;
}

.wordle-section .results-section-heading{
border-bottom-color:rgba(106,170,100,.35);
}

.dictionary-section .results-section-heading{
border-bottom-color:var(--border);
}

/* =========================
   WORD GRID
========================= */

.results-grid-section{
display:grid;
grid-template-columns:repeat(5,minmax(0,1fr));
gap:10px;
width:100%;
}

/* =========================
   WORD CARDS
========================= */

.word-card{
height:68px;
background:var(--card);
border:1px solid var(--border);
border-radius:12px;
display:flex;
align-items:center;
justify-content:center;
font-size:1.25rem;
font-weight:700;
color:var(--text);
transition:.18s;
position:relative;
}

.word-card:hover{
border-color:var(--primary);
transform:translateY(-2px);
box-shadow:0 6px 18px rgba(37,99,235,.12);
}

.wordle-section .word-card{
background:#F3F9F2;
border-color:rgba(106,170,100,.30);
}

.wordle-section .word-card:hover{
border-color:var(--green);
}

body.dark-mode .wordle-section .word-card{
background:#233526;
border-color:rgba(106,170,100,.35);
}

/* =========================
   SCRABBLE SCORE
========================= */

.scrabble-score{
position:absolute;
right:7px;
bottom:5px;
font-size:.68rem;
font-weight:700;
line-height:1;
color:var(--muted);
background:rgba(255,255,255,.75);
padding:2px 4px;
border-radius:4px;
}

body.dark-mode .scrabble-score{
background:rgba(15,23,42,.75);
color:#CBD5E1;
}

/* =========================
   NO RESULTS STATE
========================= */

.no-results{
background:var(--card);
border:2px dashed var(--border);
border-radius:18px;
padding:42px 24px;
text-align:center;
grid-column:1/-1;
}

.no-results-icon{
font-size:3rem;
margin-bottom:14px;
}

.no-results h3{
margin-bottom:8px;
font-size:1.3rem;
}

.no-results p{
color:var(--muted);
line-height:1.6;
max-width:420px;
margin:auto;
}

/* =========================
   SHOW MORE
========================= */

.show-more-wrap{
display:flex;
justify-content:center;
margin-top:24px;
}

.show-more-btn{
background:var(--panel);
border:1px solid var(--primary);
color:var(--primary);
padding:12px 28px;
border-radius:10px;
font-weight:600;
cursor:pointer;
transition:.18s;
}

.show-more-btn:hover{
background:var(--primary);
color:white;
}

/* =========================
   SETTINGS PANEL
========================= */

.settings-overlay{
position:fixed;
inset:0;
background:rgba(15,23,42,.45);
opacity:0;
visibility:hidden;
transition:.25s;
z-index:90;
}

.settings-panel{
position:fixed;
top:0;
right:-360px;
width:340px;
height:100vh;
background:var(--panel);
border-left:1px solid var(--border);
box-shadow:-10px 0 30px rgba(30,41,59,.15);
padding:24px;
transition:right .28s,background-color .25s,border-color .25s;
z-index:100;
overflow-y:auto;
}

.settings-panel.open{
right:0;
}

.settings-overlay.open{
opacity:1;
visibility:visible;
}

.settings-header{
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:28px;
}

.setting-item{
display:flex;
justify-content:space-between;
align-items:flex-start;
gap:16px;
padding:18px 0;
border-bottom:1px solid var(--border);
}

.setting-item strong{
display:block;
margin-bottom:6px;
}

.setting-item p{
font-size:.85rem;
color:var(--muted);
}

.settings-select{
height:40px;
padding:0 12px;
border:1px solid var(--border);
border-radius:8px;
background:var(--panel);
color:var(--text);
outline:none;
}

.settings-select:focus{
border-color:var(--primary);
box-shadow:0 0 0 3px rgba(37,99,235,.15);
}

/* =========================
   TOGGLE
========================= */

.toggle{
position:relative;
width:46px;
height:24px;
}

.toggle input{
opacity:0;
width:0;
height:0;
}

.toggle-slider{
position:absolute;
inset:0;
background:#CBD5E1;
border-radius:24px;
cursor:pointer;
transition:.2s;
}

.toggle-slider::before{
content:"";
position:absolute;
width:18px;
height:18px;
left:3px;
top:3px;
background:white;
border-radius:50%;
transition:.2s;
box-shadow:0 1px 3px rgba(0,0,0,.15);
}

.toggle input:checked + .toggle-slider{
background:var(--primary);
}

.toggle input:checked + .toggle-slider::before{
transform:translateX(22px);
}

/* =========================
   DARK MODE BUTTONS
========================= */

body.dark-mode .secondary-btn{
background:#263449;
border-color:#475569;
color:#F1F5F9;
}

body.dark-mode .secondary-btn:hover{
border-color:var(--primary);
color:#60A5FA;
}

body.dark-mode .settings-select{
background:#263449;
border-color:#475569;
color:#F1F5F9;
}

body.dark-mode .show-more-btn{
background:#1E293B;
color:#60A5FA;
border-color:#3B82F6;
}

body.dark-mode .show-more-btn:hover{
background:#3B82F6;
color:white;
}

/* =========================
   RESPONSIVE
========================= */

@media(max-width:1100px){

.wf-container{
grid-template-columns:360px 1fr;
}

.results-grid-section{
grid-template-columns:repeat(4,1fr);
}

}

@media(max-width:900px){

body{
padding:14px;
}

.wf-header{
flex-direction:column;
align-items:flex-start;
}

.header-actions{
width:100%;
}

.header-actions button{
flex:1;
}

.wf-container{
grid-template-columns:1fr;
}

.results-grid-section{
grid-template-columns:repeat(3,1fr);
}

.tile-row input{
width:58px;
height:58px;
font-size:1.7rem;
}

.multi-yellow input{
font-size:.9rem;
}

.settings-panel{
width:100%;
right:-100%;
}

.intro-section,
.seo-content{
padding:24px;
}

.seo-content h2{
font-size:1.5rem;
}

}

@media(max-width:600px){

.results-grid{
gap:22px;
}

.results-grid-section{
grid-template-columns:repeat(2,1fr);
}

.word-card{
height:60px;
font-size:1.1rem;
}

.no-results{
padding:34px 20px;
}

.intro-section,
.seo-content{
padding:20px;
border-radius:18px;
}

.intro-section p{
font-size:1rem;
}

.seo-content h2{
font-size:1.35rem;
}

.seo-content h3{
font-size:1.08rem;
}

}

@media(max-width:380px){

body{
padding:10px;
}

.wf-panel{
padding:20px;
}

.tile-row{
gap:6px;
}

.tile-row input{
width:52px;
height:52px;
font-size:1.5rem;
}

.results-grid-section{
gap:8px;
}

.word-card{
height:56px;
font-size:1rem;
}

.no-results{
padding:28px 16px;
}

.intro-section,
.seo-content{
padding:18px;
}

}