/* =============================================
   Scrabble Hunt v1.2 — Frontend Styles
   Lettertype: Nunito (Google Fonts)
   ============================================= */

/* Tile on page */
.scrabble-tile-wrap {
    display: inline-block;
    cursor: pointer;
}

.scrabble-tile {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 56px;
    background: #f5e6c8;
    border: 2px solid #c8a96e;
    border-radius: 5px;
    position: relative;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.3s ease;
    user-select: none;
}

.scrabble-tile:hover {
    transform: translateY(-3px);
    box-shadow: 2px 5px 8px rgba(0,0,0,0.25);
}

.scrabble-tile:active {
    transform: translateY(0);
    box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.scrabble-tile.clicked {
    opacity: 0;
    transform: scale(0.5) translateY(-10px);
    pointer-events: none;
}

.scrabble-tile__letter {
    font-size: 26px;
    font-weight: 800;
    color: #2c2010;
    line-height: 1;
    font-family: 'Nunito', sans-serif;
}

.scrabble-tile__value {
    font-size: 10px;
    color: #8a6030;
    position: absolute;
    bottom: 3px;
    right: 5px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
}

/* Endpage overview */
.scrabble-endpage {
    max-width: 680px;
    margin: 0 auto;
    font-family: 'Nunito', sans-serif;
}

.scrabble-progress {
    font-size: 14px;
    color: #666;
    margin-bottom: 1rem;
}

.scrabble-tiles-overview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 1.5rem 0;
    align-items: center;
}

.scrabble-overview-tile {
    width: 44px;
    height: 48px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    position: relative;
    border: 1px solid;
    font-family: 'Nunito', sans-serif;
}

.scrabble-overview-tile.found {
    background: #f5e6c8;
    border-color: #c8a96e;
    color: #2c2010;
}

.scrabble-overview-tile.not-found {
    background: #eee;
    border-color: #ccc;
    color: #bbb;
}

/* Blank tile for spaces */
.scrabble-overview-tile.blank {
    background: #fff;
    border-color: #ddd;
    color: transparent;
}

.scrabble-overview-tile__num {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 9px;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
}

.scrabble-overview-tile.found .scrabble-overview-tile__num { color: #8a6030; }
.scrabble-overview-tile.not-found .scrabble-overview-tile__num { color: #ccc; }

.scrabble-status {
    font-size: 15px;
    margin-bottom: 1.5rem;
    padding: 10px 14px;
    border-radius: 6px;
    font-family: 'Nunito', sans-serif;
}

.scrabble-status.complete {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.scrabble-status.incomplete {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.scrabble-form-intro {
    font-size: 15px;
    margin-bottom: 1rem;
    color: #333;
    font-family: 'Nunito', sans-serif;
}

.scrabble-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.scrabble-input-group input {
    flex: 1;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    min-width: 200px;
    font-family: 'Nunito', sans-serif;
}

.scrabble-input-group button {
    padding: 10px 24px;
    background: #2c6e49;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
}

.scrabble-input-group button:hover { background: #1e4d33; }
.scrabble-input-group button:disabled { background: #999; cursor: not-allowed; }

.scrabble-answer-result {
    font-size: 14px;
    font-weight: 700;
    margin-top: 8px;
    min-height: 20px;
    font-family: 'Nunito', sans-serif;
}

.scrabble-answer-result.correct { color: #155724; }
.scrabble-answer-result.incorrect { color: #721c24; }

/* Admin reset button */
.scrabble-admin-reset {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px dashed #ccc;
}

#scrabble-reset-btn {
    padding: 8px 16px;
    background: #fff;
    color: #666;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    transition: background 0.2s;
}

#scrabble-reset-btn:hover {
    background: #f8f8f8;
    color: #333;
}
