/* --------------------- CSS Reset -------------------- */

html,body,div,span,applet,object,iframe,
h1,h2,h3,h4,h5,h6,p,blockquote,pre,
a,abbr,acronym,address,big,cite,code,
del,dfn,em,img,ins,kbd,q,s,samp,
small,strike,strong,sub,sup,tt,var,
b,u,i,center,dl,dt,dd,ol,ul,li,
fieldset,form,label,legend,table,
caption,tbody,tfoot,thead,tr,th,td,
article,aside,canvas,details,embed,
figure,figcaption,footer,header,
hgroup,menu,nav,output,ruby,
section,summary,time,mark,audio,video{
margin:0;
padding:0;
border:0;
font-size:100%;
font:inherit;
vertical-align:baseline;
box-sizing:border-box;
}

article,aside,details,figcaption,
figure,footer,header,hgroup,menu,
nav,section{
display:block;
}

body{
line-height:1;
font-family:Arial, Helvetica, sans-serif;
text-align:center;
background-image:url("../images/WoF Background.jpg");
background-size:cover;
}

/* ---------------------- Layout ---------------------- */

#main{
width:850px;
margin:auto;
background:white;
padding:20px;
border-radius:10px;
box-shadow:0 0 10px rgba(0,0,0,.2);
}

/* ---------------------- Category -------------------- */

#category{
background:gold;
color: var(--text-dark);
padding:8px 15px;
border-radius:6px;
display:inline-block;
font-size:20px;
margin-bottom:10px;
}

/* ---------------------- Score Panel ----------------- */

#scorePanel{
display:flex;
justify-content:center;
gap:20px;
margin:15px 0;
font-weight:bold;
}

.scoreBox{
background:#222;
color:#00ff66;
padding:10px 16px;
border-radius:6px;
font-size:18px;
}

/* ---------------------- Puzzle Board ---------------- */

#puzzleBoard{
width:520px;
margin:25px auto;
display:grid;
grid-template-columns:repeat(13,36px);
gap:6px;
justify-content:center;
}

.tile{
width:36px;
height:48px;
background:#1b8f2e;
color:white;
display:flex;
align-items:center;
justify-content:center;
font-size:22px;
font-weight:bold;
border:2px solid #0d4f17;
border-radius:4px;

transform:rotateY(0deg);
transition:transform .6s ease;
transform-style: preserve-3d;
}

.tile.revealed{
transform: rotateY(0deg);
animation: flipTile .6s, tileGlow .6s;
}

.tile.revealed{
transform: rotateY(0deg);
animation: flipTile .6s, tileGlow .6s;
}

@keyframes tileGlow{
0%{box-shadow:0 0 0px lime;}
50%{box-shadow:0 0 15px lime;}
100%{box-shadow:0 0 0px lime;}
}

.space{
background:transparent;
border:none;
}

/* ---------------------- Wheel ---------------------- */

#wheelContainer{
width:320px;
margin:30px auto;
position:relative;
}

#wheelContainer::before{
content:"▼";
font-size:40px;
color:red;
position:absolute;
top:-25px;
left:50%;
transform:translateX(-50%);
}

#wheelCanvas{
transition:transform 5s cubic-bezier(.17,.67,.35,1.2);
}

/* ---------------------- Buttons -------------------- */

#spinBtn{
font-size:20px;
padding:10px 20px;
margin:20px auto;
display:block;
background:blue;
color:white;
border:none;
border-radius:5px;
cursor:pointer;
}

#spinBtn:hover{
background:darkblue;
}

#buyVowelBtn{
margin-top:10px;
padding:10px 18px;
font-size:16px;
font-weight:bold;
background:#27ae60;
color:white;
border:none;
border-radius:6px;
cursor:pointer;
}

#buyVowelBtn:hover{
background:#1e8449;
}

/* ---------------------- Keyboard ------------------- */

.keyboardRow{
display:flex;
justify-content:center;
gap:8px;
margin-bottom:6px;
}

#letters button{
width:40px;
height:40px;
font-size:18px;
font-weight:bold;
cursor:pointer;
border-radius:4px;
border:1px solid #444;
background:#eee;
}

#letters button:disabled{
background:#aaa;
cursor:not-allowed;
}

.correctLetter{
background:#2ecc71;
color:white;
}

.wrongLetter{
background:#e74c3c;
color:white;
}

/* ---------------------- Solve ---------------------- */

#solveInput{
padding:8px;
font-size:16px;
width:250px;
}

#solveBtn{
padding:8px 15px;
font-size:16px;
cursor:pointer;
margin-left:10px;
}

/* ---------------------- Message -------------------- */

#gameMessage{
margin-top:10px;
font-size:20px;
font-weight:bold;
min-height:25px;
}

/* ---------------------- Confetti ------------------- */

#confettiCanvas{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
pointer-events:none;
z-index:999;
}

footer{
margin-top:20px;
padding:20px;
background:#333;
color:white;
}