:root {
  font-family: Inter, sans-serif;
  font-feature-settings: 'liga' 1, 'calt' 1; /* fix for Chrome */
  color: #2f261f;
  background: #f4c04f;
}
@supports (font-variation-settings: normal) {
  :root { font-family: InterVariable, sans-serif; }
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    text-align: center;
    background:
        linear-gradient(135deg, #f5c04c 0%, #f5bf49 100%);
    margin: 0;
    padding: 96px 20px 20px;
    min-height: 100vh;
    color: #2f261f;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spanish-flag {
            position: fixed;
            top: 18px;
            right: 18px;
            z-index: 30;
            width: 54px;
            height: 36px;
            border-radius: 8px;
            object-fit: cover;
            border: 2px solid rgba(255, 246, 218, 0.86);
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
        }

.game-container {
    background: rgba(255, 255, 255, 0.95);
    width: 90%;
    max-width: 760px;
    margin: 20px auto;
    padding: 40px;
    border-top: 8px solid #AA151B;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(10px);
}

h1 {
    color: #2f261f;
    font-size: clamp(2rem, 5vw, 3.1rem);
    line-height: 1.05;
    margin: 0 0 10px;
}

h3 {
    width: fit-content;
    margin: 0 auto 26px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #F1BF00;
    color: #5f0f14;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

#score {
    width: fit-content;
    margin: 0 auto 24px;
    padding: 10px 16px;
    border: 1px solid #f0d28a;
    border-radius: 999px;
    background: #fff1ba;
    color: #AA151B;
    font-size: 1rem;
    font-weight: 800;
}

#definition-box {
    margin: 0 0 24px;
    padding: 28px 22px;
    border: 1px solid #f0d28a;
    border-radius: 16px;
    background:
        linear-gradient(90deg, #AA151B 0 10px, transparent 10px),
        #fffaf0;
    color: #AA151B;
    font-size: clamp(1.45rem, 4vw, 2.15rem);
    font-weight: 800;
    line-height: 1.6;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

#options-container button {
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 12px 18px;
    font-size: 1.1em;
    font-weight: 800;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    background: #f4c04a;
    color: white;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.16);
}

#options-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

#options-container button:hover {
    background: #5f0f14;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

#next-button {
    margin: 25px auto;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: 800;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    background: #AA151B;
    color: white;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

#next-button:hover {
    background: #5f0f14;
    transform: translateY(-2px);
}

#hints-container {
    margin: 30px 0;
    padding: 20px;
    background: #fff1ba;
    border-radius: 15px;
}

#hints-container h3 {
    color: #2f261f;
    margin-bottom: 15px;
}

.hint-btn {
    margin: 8px;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    background: #AA151B;
    color: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(241, 196, 15, 0.2);
}

.hint-btn:hover:not(:disabled) {
    background: #5f0f14;
    transform: translateY(-2px);
}

.hint-btn:disabled {
    background: #ECF0F1;
    color: #95A5A6;
    cursor: not-allowed;
    box-shadow: none;
}

#resultContainer {
    align-content: center;
    gap: 14px;
    justify-content: center;
    z-index: 1000;
    position: fixed;
    border: 1px solid #f0d28a;
    border-top: 8px solid #AA151B;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.24);
    display: none;
    width: 90vw;
    max-width: 600px;
    height: auto;
    min-height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 20px;
    padding: 30px;
}

#resultText {
    color: #7d3f05;
    font-size: 2em;
    margin: 0;
}

#pointsText {
    color: #2f261f;
    font-size: 1.25em;
    margin: 0;
}

#sentenceButton {
    width: 85%;
    margin: 15px auto;
    padding: 15px;
    font-size: 1.1em;
    cursor: pointer;
    border: none;
    border-radius: 12px;
    background: #D97904;
    color: white;
    transition: all 0.3s ease;
}

#sentenceButton:hover {
    background: #5f0f14;
    transform: translateY(-2px);
}


.sentence-option {
    width: 100%;
    margin: 10px auto;
    padding: 15px;
    font-size: 1.1em;
    font-weight: 800;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    background: #D97904;
    color: white;
    transition: background-color 0.2s ease, transform 0.2s ease;
    display: block;
}

.sentence-option:hover {
    background: #5f0f14;
    transform: translateY(-2px);
}

.sentence-option:disabled {
    cursor: not-allowed;
    opacity: 0.75;
    transform: none;
}

#bonusRound {
    padding: 16px;
    border-radius: 14px;
    transition: background-color 0.3s ease;
}

#bonusRound h3 {
    width: auto;
    margin-bottom: 14px;
    background: #fff1ba;
    color: #2f261f;
    text-transform: none;
}

#answerWas {
    margin: 0 0 16px;
    color: #AA151B;
    font-weight: 800;
}

@media (max-width: 650px){
    body {
        padding: 120px 8px 8px;
    }

    .game-container {
        width: 100%;
        margin: 10px auto;
        padding: 18px 10px 20px;
        border-radius: 16px;
    }

    h1 {
        margin-bottom: 10px;
        font-size: 1.6em;
    }

    #definition-box {
        font-size: 1.15rem;
        margin-bottom: 18px;
        padding: 20px 16px;
    }

    #options-container {
        grid-template-columns: 1fr;
    }

    #options-container button {
        padding: 8px;
        font-size: 1em;
    }

    #resultContainer {
        width: 92vw;
        padding: 22px;
    }

    .hint-btn {
        margin: 4px;
        padding: 7px 13px;
        font-size: 0.8em;
    }
}



.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: #555;
  color: #fff;
  text-align: center;
  padding: 5px 0;
  border-radius: 6px;

  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;

  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #555 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

header {
      position: fixed;
      top: 0;
      left: 0;
      z-index: 20;
      width: 100%;
      background: #AA151B;
      color: #fff;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    }

    .header-container {
      width: min(1080px, calc(100% - 32px));
      margin: 0 auto;
      padding: 16px 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
    }

    .logo {
      color: #fff;
      font-size: 1.35rem;
      font-weight: 800;
      letter-spacing: 0;
      text-decoration: none;
    }

    nav {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    nav a {
      color: #fff;
      text-decoration: none;
      padding: 10px 16px;
      background: #f5bf49;
      border-radius: 6px;
      font-weight: 700;
      transition: background-color 0.2s ease, transform 0.2s ease;
    }

    nav a:hover {
      background: #5f0f14;
      transform: translateY(-1px);
    }

    @media (max-width: 600px) {
        .header-container {
        align-items: flex-start;
        flex-direction: column;
      }

      nav {
        width: 100%;
        justify-content: stretch;
      }

      nav a {
        flex: 1;
        text-align: center;
      }
    }
