diff --git a/html/word-guesser/css/styles.css b/html/word-guesser/css/styles.css index c7d03a2..7791b95 100644 --- a/html/word-guesser/css/styles.css +++ b/html/word-guesser/css/styles.css @@ -6,13 +6,20 @@ padding: 2rem; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); margin-top: 1rem; + max-width: 400px; + margin: 0 auto; + padding: 10px; + display: flex; + flex-direction: column; + gap: 15px; } .game-header h2 { color: var(--accent-primary); border-bottom: 2px solid var(--accent-primary); display: inline-block; - margin-bottom: 1.5rem; + font-size: 1.4rem; + margin-bottom: 0; padding-bottom: 0.2rem; } @@ -22,38 +29,47 @@ font-size: 0.95rem; color: #6c757d; } +#game_intro { + font-size: 0.85rem; + opacity: 0.7; +} /* Word Board (Wheel of Fortune Style) */ #current_word { - display: flex !important; + display: flex; flex-direction: row !important; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; - gap: 8px; + gap: 5px; list-style: none; padding: 1rem 0; width: 100%; font-weight: bold; letter-spacing: 5px; font-size: 1.5rem; + list-style: none; + padding: 10px 0; } #current_word li { - width: 45px; - height: 60px; background-color: var(--bg-body); border: 2px solid var(--accent-primary); border-radius: 4px; display: flex; align-items: center; justify-content: center; - font-size: 2rem; - font-weight: 800; color: var(--accent-primary); box-shadow: 2px 2px 0px rgba(44, 62, 80, 0.2); text-transform: uppercase; + + width: 32px; + height: 42px; + display: flex; + border-bottom: 3px solid var(--border-medium); + font-weight: bold; + font-size: 1.4rem; } .word-display-field { display: block !important; /* Break out of the 2-column grid */ @@ -137,28 +153,44 @@ /* Guess History Pills */ #guesses { display: flex; - flex-wrap: wrap; - gap: 6px; + flex-wrap: nowrap; /* Keep them on one line */ + overflow-x: auto; /* Scroll if there are too many */ + gap: 5px; + padding: 5px 0; + margin: 0; list-style: none; + scrollbar-width: none; /* Hide scrollbar for clean UI */ +} + +#guesses::-webkit-scrollbar { + display: none; /* Hide scrollbar for Chrome/Safari */ } #guesses li { - background-color: #e3f2fd; +} +#guesses li { + background: var(--accent-secondary, #e9ecef); color: #1976d2; - padding: 2px 10px; + padding: 2px 8px; border-radius: 20px; font-size: 0.85rem; - font-family: "Courier New", Courier, monospace; + font-family: "Roboto Mono", monospace; + /* font-family: "Courier New", Courier, monospace; */ font-weight: bold; + flex-shrink: 0; border: 1px solid #bbdefb; + border-radius: 3px; } /* Notifications */ #notifications { text-align: center; font-weight: 600; - min-height: 1.5rem; margin-bottom: 1rem; + min-height: 1.2em; + color: #d9534f; + font-style: italic; + text-align: center; } .success-msg { @@ -174,83 +206,161 @@ padding: 1rem; margin: 0.5rem; } - - /* Shrink the tiles so long words don't wrap awkwardly */ - #current_word { - gap: 4px; - padding: 0.5rem 0; + #game_container { + top: 0px; + left: 0px; + position: fixed; + z-index: 1000; + } + #site-header, + footer, + #guesses, + #guess_letter_container { + display: none; + position: absolute; + z-index: -9999; } - #current_word li { - width: 30px; /* Reduced from 45px */ - height: 40px; /* Reduced from 60px */ - font-size: 1.2rem; /* Reduced from 2rem */ - border-width: 1px; - } + /* /1* Shrink the tiles so long words don't wrap awkwardly *1/ */ + /* #current_word { */ + /* gap: 4px; */ + /* padding: 0.5rem 0; */ + /* } */ - /* Stack the form fields vertically instead of 2-columns */ - .formField { - grid-template-columns: 1fr; - gap: 5px; - text-align: center; - } + /* #current_word li { */ + /* width: 30px; /1* Reduced from 45px *1/ */ + /* height: 40px; /1* Reduced from 60px *1/ */ + /* font-size: 1.2rem; /1* Reduced from 2rem *1/ */ + /* border-width: 1px; */ + /* } */ - /* Make the Alphabet Grid look like a keypad */ - .alphabet-grid { - display: grid; - grid-template-columns: repeat(auto-fill, minmax(35px, 1fr)); - gap: 5px; - margin-top: 1.5rem; - } + /* /1* Stack the form fields vertically instead of 2-columns *1/ */ + /* .formField { */ + /* grid-template-columns: 1fr; */ + /* gap: 5px; */ + /* text-align: center; */ + /* } */ - .letter-btn { - padding: 10px 0; - font-family: "Roboto Mono", monospace; - font-weight: bold; - background: var(--bg-tag); - border: 1px solid var(--border-medium); - border-radius: 4px; - cursor: pointer; - } + /* /1* Make the Alphabet Grid look like a keypad *1/ */ + /* .alphabet-grid { */ + /* display: grid; */ + /* grid-template-columns: repeat(auto-fill, minmax(35px, 1fr)); */ + /* gap: 5px; */ + /* margin-top: 1.5rem; */ + /* } */ - .letter-btn:disabled { - opacity: 0.4; - cursor: not-allowed; - } + /* .letter-btn { */ + /* padding: 10px 0; */ + /* font-family: "Roboto Mono", monospace; */ + /* font-weight: bold; */ + /* background: var(--bg-tag); */ + /* border: 1px solid var(--border-medium); */ + /* border-radius: 4px; */ + /* cursor: pointer; */ + /* } */ + + /* .letter-btn:disabled { */ + /* opacity: 0.4; */ + /* cursor: not-allowed; */ + /* } */ } .alphabet-grid { display: grid; - grid-template-columns: repeat( - 9, - 1fr - ); /* 9 columns fits 26 letters in ~3 rows */ - gap: 8px; - margin-top: 2rem; - padding: 10px; - background: var(--bg-tag); + grid-template-columns: repeat(9, 1fr); + gap: 4px; + background: #ebf3f9; + padding: 8px; border-radius: 8px; } .letter-btn { - background: #fff; - border: 1px solid var(--border-medium); - padding: 12px 0; - font-family: "Roboto Mono", monospace; - font-weight: bold; + aspect-ratio: 1 / 1.2; + padding: 0; font-size: 1.1rem; + font-weight: bold; + border: 1px solid #ced4da; border-radius: 4px; - cursor: pointer; - transition: background 0.1s; + background: #fff; + box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1); + transition: + transform 0.1s, + background 0.1s; } .letter-btn:active { - background: var(--accent-primary); - color: #fff; + transform: translateY(2px); + box-shadow: none; + background: #dee2e6; } .letter-btn:disabled { background: #e9ecef; color: #adb5bd; - cursor: not-allowed; + box-shadow: none; + border-color: transparent; } + +.game-footer { + display: flex; + justify-content: space-between; + align-items: center; + padding: 10px; + border-top: 1px solid #eee; + font-size: 0.9rem; +} + +#notifications { + min-height: 1.2em; + color: #d9534f; + font-style: italic; + text-align: center; +} + +#game_metrics { + display: flex; + justify-content: space-between; + align-items: flex-start; + gap: 15px; + padding: 10px; + background: var( + --bg-secondary, + #f8f9fa + ); /* Light background to define the area */ + border-radius: 8px; + margin: 10px 0; +} + +/* Individual Metric Groups */ +.formField.metric_group, +#game_metrics .formField { + flex: 1; + display: flex; + flex-direction: column; + gap: 4px; + min-width: 0; /* Critical for preventing flex items from overflowing */ +} + +/* Labels */ +#game_metrics .label { + font-size: 0.75rem; + font-weight: bold; + text-transform: uppercase; + color: var(--text-muted, #6c757d); + letter-spacing: 0.05em; +} + +/* Attempts Input Styling */ +#guess_count { + width: 100%; + padding: 8px; + border: 1px solid var(--border-light, #dee2e6); + border-radius: 4px; + background: #fff; + font-family: "Roboto Mono", monospace; + font-size: 1.1rem; + text-align: center; + color: var(--text-primary, #212529); +} + +/* Guesses List Styling */ diff --git a/html/word-guesser/index.html b/html/word-guesser/index.html index eb40e3e..1b40d1c 100644 --- a/html/word-guesser/index.html +++ b/html/word-guesser/index.html @@ -1,17 +1,24 @@ -