.mode-selected {
    background-color: #3498db;
    color: white;
    font-weight: bold;
    border: 2px solid #1f6aa5;
}

.scoreboard {
    background: rgba(255,255,255,0.85);
    padding: 15px;
    border-radius: 10px;
    border: 3px solid black;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    width: 300px;
    text-align: center;
    margin: 0 auto 20px auto;
}

#flag-image {
    display: block;
    margin: 20px auto 15px auto;
    width: 200px;
}

button {
    margin: 8px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
}

.main-geoquest-btn {
    display: block;
    width: 100%;
    padding: 18px;
    font-size: 22px;
    font-weight: bold;
    background-color: #e67e22;
    color: white;
    border: 3px solid #b55f18;
    border-radius: 12px;
    margin-bottom: 20px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0,0,0,0.25);
}

#other-modes {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

#other-modes button {
    padding: 10px 14px;
    font-size: 15px;
    border-radius: 8px;
}

#share-box {
    display:none;
    margin-top:20px;
}

#share-text {
    width:100%;
    height:120px;
    padding:10px;
    font-size:14px;
    resize:none;
}

/* ⭐ Give Up button hidden by default */
#give-up-btn {
    display:none;
    margin-top:10px;
    background:#c0392b;
    color:white;
    padding:10px 20px;
    border-radius:8px;
    font-size:16px;
}

#give-up-btn:hover {
    background:#e74c3c;
}
#daily-info-box {
    background: #f8f8f8;
    border: 2px solid #ccc;
    padding: 12px 18px;
    margin: 10px auto;
    border-radius: 8px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    width: fit-content;
    display: inline-block;
}

#daily-info-box div {
    margin: 6px 0;
    display: block;
}
body {
    transform: scale(0.85);
    transform-origin: top center;
}
/* ===== Left Sidebar (permanent instructions) ===== */

#permanent-instructions {
  padding: 20px;                 /* Adds breathing room inside the box */
  margin-right: 20px;            /* Space between sidebar and main panel */
  background: rgba(255, 255, 255, 0.85); /* Clean card-like background */
  border-radius: 10px;           /* Smooth rounded corners */
  line-height: 1.6;              /* Better readability */
}

/* Spacing inside the sidebar */
#permanent-instructions h2 {
  margin-top: 20px;
  margin-bottom: 10px;
}

#permanent-instructions p,
#permanent-instructions li {
  margin-bottom: 10px;
}

/* ===== Main Panel ===== */

#mainPanel {
  padding: 25px;                 /* Makes the main game area feel premium */
}

/* Score box spacing */
#scoreBox {
  padding: 15px;
}

/* Buttons */
button {
  margin: 8px 0;                 /* Vertical spacing between buttons */
}

/* ===== Attribution Line ===== */

.attribution {
  margin-top: 20px;
  margin-bottom: 20px;
}

/* ===== Footer ===== */

footer {
  text-align: center;
  margin-top: 50px;              /* More space above footer */
}

/* Rainbow link styling */
footer a,
.rainbow {
  background: linear-gradient(90deg, red, orange, yellow, green, blue, purple);
  -webkit-background-clip: text;
  color: transparent;
  font-weight: bold;
  text-decoration: none;
}
#game-container {
  padding-top: 40px;
  padding-bottom: 20px;   /* small so footer comes up */
  min-height: 925px;      /* tall game area */
  width: 60%;
  max-width: 900px;
  margin-bottom: 20px;    /* small so footer comes up */
}


#game-container {
  flex-grow: 1;
}
footer {
  background: rgba(255, 255, 255, 0.85); /* light overlay */
  padding: 15px;
  border-radius: 10px;
  width: fit-content;
  margin: 40px auto;
}
.page-content {
  background: rgba(255, 255, 255, 0.85);
  padding: 25px;
  border-radius: 10px;
  max-width: 900px;
  margin: 40px auto;
  line-height: 1.6;
}
#leaderboard {
  display: none; /* still controlled by JS */

  /* Match right sidebar formatting */
  background: rgba(255, 255, 255, 0.9);
  padding: 20px;
  border-radius: 10px;
  border: 3px solid black;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  line-height: 1.4;
  color: #333;
  width: 300px;
  margin-top: 20px; /* space below right sidebar */
}

#leaderboard h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.2rem;
  border-bottom: 2px solid #e67e22;
  padding-bottom: 5px;
  color: #2c3e50;
}

#leaderboard ul {
  margin: 0;
  padding-left: 18px;
}

#leaderboard li {
  margin-bottom: 6px;
  font-size: 0.88rem;
}
#result:empty,
#daily-result:empty {
    display: none;
}
/* =========================================
   GEOQUEST MOBILE LAYOUT
   Desktop is unaffected
   ========================================= */

@media (max-width: 700px) {

    body {
        transform: none;
        padding: 10px;
        box-sizing: border-box;
        overflow-x: hidden;
    }

.game-logo {
    display: none;
}
#geoquest-instructions {
    display: none !important;
}

    /* Main page uses the phone width */
    .page-layout {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    /* Put the actual game FIRST on mobile */
    #game-container {
        order: 1;
        width: 100%;
        max-width: 100%;
        min-height: 0;
        padding: 20px 15px;
        margin: 0;
        box-sizing: border-box;
    }

    /* Instructions go underneath the game */
    .sidebar-left {
        order: 2;
        width: 100%;
        margin: 20px 0 0 0;
        box-sizing: border-box;
    }

    .sidebar-right {
        order: 3;
        width: 100%;
        margin: 20px 0 0 0;
        box-sizing: border-box;
    }

    #permanent-instructions,
    #geoquest-instructions {
        width: 100%;
        box-sizing: border-box;
        margin: 0;
    }

    /* Keep title from getting oversized */
    .rainbow-title {
        font-size: 28px;
        margin-top: 5px;
    }

    /* Scoreboards fill available space */
    .scoreboard {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Daily GeoQuest button */
    .main-geoquest-btn {
        width: 100%;
        font-size: 20px;
        padding: 15px 10px;
    }

    /* Normal game modes fit cleanly */
    #other-modes {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    #other-modes button {
        flex: 1 1 30%;
        margin: 0;
        padding: 10px 5px;
        font-size: 14px;
        white-space: nowrap;
    }

    /* City country selection */
    #city-country-buttons {
        width: 100%;
    }

    #city-country-buttons button {
        margin: 4px;
        padding: 8px 10px;
        font-size: 14px;
    }

#guess-input {
    display: block;
    width: 90%;
    box-sizing: border-box;
    margin: 20px auto 10px auto;
    font-size: 16px;
    padding: 12px;
}

    #submit-btn {
        width: 100%;
        margin: 0 0 8px 0;
        padding: 12px;
    }

    #give-up-btn {
        width: 100%;
        margin: 8px 0;
    }

    /* Images can't overflow the phone */
    #flag-image {
        width: 180px;
        max-width: 80%;
        height: auto;
    }

    #daily-images img {
        max-width: 100%;
        height: auto;
    }

    /* Share area */
    #share-text {
        width: 100%;
        box-sizing: border-box;
    }

    #copy-share-btn {
        width: 100%;
        margin: 8px 0;
    }

    /* Leaderboard fits screen */
    #leaderboard {
        width: 100%;
        box-sizing: border-box;
    }

    /* Footer wraps instead of overflowing */
    footer {
        width: calc(100% - 20px);
        box-sizing: border-box;
        margin: 20px auto;
        line-height: 2;
    }
}







