
/* ==========================================
   AFOGAO v2 - Dark Modern Theme
========================================== */

:root {
    --bg: #1b2333;
    --panel: #273246;
    --panel2: #334155;
    --text: #f8fafc;
    --muted: #cbd5e1;
    --cyan: #3dd5ff;
    --violet: #8b5cf6;
    --border: #475569;
    --success: #22c55e;
}

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

html, body {
    height: 100%;
    font-family: Inter,Segoe UI,Arial,sans-serif;
    background: radial-gradient(circle at top, #35445e 0%, #202b3d 45%, #1b2333 100%);
    color: var(--text);
}

body{
  display:flex;
  flex-direction:column;
}

.hidden{display:none!important}

header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    background: #202a3d;
    border-color: #475569;
}

header::before{
  content:"";
  width:70px;
  height:70px;
  background:url("assets/logo.svg") center/contain no-repeat;
}

header h1{
  font-size:2.3rem;
  color:white;
}

header p{
  color:var(--cyan);
  margin-top:4px;
}

main{
  width:min(950px,96%);
  margin:auto;
  padding:20px;
}

#startScreen,
#gameScreen,
#rankingScreen,
#statsScreen{
  background:rgba(17,24,39,.92);
  border:1px solid var(--border);
  border-radius:18px;
  padding:22px;
  backdrop-filter:blur(8px);
  box-shadow:0 10px 30px rgba(0,0,0,.35);
}

    #startScreen h2 {
        margin-bottom: 10px;
    }

    #startScreen input {
        display: block;
        width: 100%;
        max-width: 420px;
        margin-bottom: 10px;
    }

    #startScreen button {
        width: 220px;
    }

#startScreen {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

#playerName {
    margin-top: 8px;
    margin-bottom: 22px;
}

.topBar {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 12px;
    margin-bottom: 24px;
}

    .topBar > div {
        background: var(--panel2);
        border: 1px solid var(--border);
        border-radius: 14px;
        padding: 14px 10px;
        text-align: center;
    }

    .topBar strong {
        display: block;
        font-size: 1rem;
        color: var(--cyan);
        margin-bottom: 8px;
    }

    .topBar span {
        font-size: 1.5rem;
        font-weight: 700;
    }

.imageContainer{
  display:flex;
  justify-content:center;
  align-items:center;
  height:260px;
  margin-bottom:15px;
}

#gameImage{
  max-height:240px;
  max-width:100%;
  object-fit:contain;
}

#word{
  text-align:center;
  font-size:clamp(2rem,4vw,3rem);
  letter-spacing:10px;
  font-weight:700;
  margin:20px 0;
}

#usedLetters{
  text-align:center;
  color:var(--muted);
  margin:12px 0 18px;
  min-height:28px;
}

.letterInput{
  display:flex;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
}

input{
  background:#0c1322;
  color:white;
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px;
  font-size:1.1rem;
}

#letter{
  width:70px;
  text-align:center;
  text-transform:uppercase;
}

button{
  border:none;
  border-radius:12px;
  padding:12px 22px;
  color:white;
  cursor:pointer;
  font-weight:600;
  background:linear-gradient(135deg,var(--cyan),var(--violet));
  transition:.2s;
}

button:hover{
  transform:translateY(-2px);
  box-shadow:0 0 20px rgba(34,211,238,.25);
}

.buttons,#menuButtons{
  display:flex;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
  margin-top:20px;
}

#definition {
    margin-top: 18px;
    padding: 16px;
    border-radius: 14px;
    background: #364152;
    border-left: 5px solid var(--cyan);
    margin-bottom: 5px;
}

table.ranking{
  width:100%;
  border-collapse:collapse;
  margin-top:15px;
}

table.ranking th{
  background:#172036;
  color:var(--cyan);
}

table.ranking th,
table.ranking td{
  padding:12px;
  border-bottom:1px solid var(--border);
  text-align:center;
}

footer {
    margin-top: 25px;
    padding: 18px;
    text-align: center;
    color: var(--muted);
    border-top: 1px solid var(--border);
    background: #202a3d;
    border-color: #475569;
}

footer::before{
  content:"";
  display:block;
  width:28px;
  height:28px;
  margin:0 auto 8px;
  background:url("assets/logo.svg") center/contain no-repeat;
}

@media(max-width:768px){

    .topBar {
        grid-template-columns: repeat(2,1fr);
        gap: 8px;
    }

.imageContainer{
height:180px;
}

#gameImage{
max-height:170px;
}

#word{
font-size:2rem;
letter-spacing:6px;
}

    .buttons button,
    #menuButtons button,
    #startScreen button {
        width: 100%;
    }

.letterInput{
flex-direction:column;
align-items:center;
}

}

.keyboard {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
}

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

.key {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    background: #45556f;
    color: white;
    transition: .2s;
}

.key {
    flex: 1;
    min-width: 28px;
    max-width: 40px;
    height: 42px;
    font-size: 18px;
    padding: 0;
}

    .key:hover {
        background: #5f7fff;
    }

    .key.correct {
        background: #10b981 !important;
        color: white;
    }

    .key.wrong {
        background: #ef4444 !important;
        color: white;
    }

.keyboardRow:last-child {
    justify-content: center;
}

.keyboardRow {
    gap: 4px;
}

#startScreen,
#gameScreen,
#rankingScreen,
#statsScreen {
    background: #2a3448;
    border: 1px solid #475569;
}

#rankingScreen,
#statsScreen {
    margin-top: 5px;
}

.dictionaryBadge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 6px 14px;
    font-size: .82rem;
    font-weight: 600;
    color: #9adfff;
    border: 1px solid rgba(0,200,255,.25);
    background: rgba(255,255,255,.05);
    border-radius: 999px;
}

.brand {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    text-align: left;
}

.logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    flex-shrink: 0;
}

.brandText {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand h1 {
    margin: 0;
    font-size: 3rem;
    line-height: 1;
}
.brand p {
    margin: 8px 0 0;
    color: #2fd6ff;
    font-size: 1.45rem;
}
.dictionaryInfo {
    margin-top: 8px;
    color: #bfc8d8;
    font-size: .95rem;
    font-weight: 500;
}

.logo {
    width: 60px;
    height: 60px;
}
