Add final results modal, active rules display, and UI improvements

- Add big final results modal at game end with rankings and share button
- Add active rules bar showing enabled variants during gameplay
- Increase spacing between player cards and opponents row
- Add Wolfpack bonus rule (2 pairs of Jacks = -5 pts)
- Change joker options to radio buttons (None/Standard/Lucky Swing/Eagle-Eye)
- Update Eagle-Eye jokers: +2 pts unpaired, -4 pts paired
- Add card flip animation on discard pile
- Redesign waiting room layout with side-by-side columns
- Style card backs with red Bee-style diamond crosshatch pattern
- Compact standings panel to show top 4 per category
- Various CSS polish and responsive improvements

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Aaron D. Lee
2026-01-24 23:53:07 -05:00
parent f4275c7a7d
commit 39b78a2ba6
10 changed files with 1283 additions and 438 deletions

View File

@@ -6,8 +6,8 @@
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
background-color: #1a472a;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='%23224d32' fill-opacity='0.4'%3E%3Cpath d='M15 5c0-1.1.9-2 2-2h6c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2h-6c-1.1 0-2-.9-2-2V5zm0 40c0-1.1.9-2 2-2h6c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2h-6c-1.1 0-2-.9-2-2v-8z'/%3E%3Cpath d='M35 25c0-1.1.9-2 2-2h6c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2h-6c-1.1 0-2-.9-2-2v-8z'/%3E%3Ccircle cx='10' cy='30' r='3'/%3E%3Ccircle cx='50' cy='10' r='3'/%3E%3Ccircle cx='50' cy='50' r='3'/%3E%3Cpath d='M30 18l3 5h-6l3-5zm0 24l3 5h-6l3-5z'/%3E%3C/g%3E%3C/svg%3E");
/* Dark emerald pool table felt */
background: linear-gradient(180deg, #0a4528 0%, #0d5030 50%, #0a4528 100%);
min-height: 100vh;
color: #fff;
}
@@ -61,11 +61,153 @@ body {
/* Waiting Screen */
#waiting-screen {
max-width: 500px;
max-width: 1000px;
margin: 0 auto;
padding: 20px 40px;
position: relative;
}
/* Desktop: side-by-side layout */
.waiting-layout {
display: grid;
grid-template-columns: 220px 1fr;
gap: 25px;
align-items: start;
}
.waiting-left-col {
display: flex;
flex-direction: column;
gap: 15px;
}
.waiting-left-col .players-list {
background: rgba(0,0,0,0.2);
border-radius: 10px;
padding: 15px;
}
.waiting-left-col .players-list h3 {
margin: 0 0 10px 0;
font-size: 1rem;
}
#waiting-screen .settings {
background: rgba(0,0,0,0.2);
border-radius: 10px;
padding: 20px;
}
#waiting-screen .settings h3 {
margin: 0 0 15px 0;
}
/* Basic settings in a row */
.basic-settings-row {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 12px;
margin-bottom: 15px;
align-items: end;
}
.basic-settings-row .form-group {
margin-bottom: 0;
}
.basic-settings-row .form-group label {
font-size: 0.8rem;
margin-bottom: 4px;
display: block;
}
.basic-settings-row select {
width: 100%;
padding: 8px 4px;
}
.basic-settings-row .cpu-controls {
display: flex;
gap: 5px;
}
.basic-settings-row .cpu-controls .btn {
flex: 1;
padding: 8px 0;
}
#waiting-message {
grid-column: 1 / -1;
text-align: center;
margin-top: 15px;
}
/* Mobile: stack vertically */
@media (max-width: 700px) {
.waiting-layout {
grid-template-columns: 1fr;
}
.basic-settings-row {
grid-template-columns: 1fr 1fr;
}
}
/* Room Code Banner */
.room-code-banner {
position: fixed;
top: 0;
right: 0;
z-index: 100;
background: linear-gradient(135deg, rgba(244, 164, 96, 0.9) 0%, rgba(230, 140, 70, 0.95) 100%);
padding: 10px 15px;
border-radius: 0 0 0 12px;
display: flex;
align-items: center;
gap: 10px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.room-code-label {
font-size: 0.65rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.1em;
color: rgba(26, 71, 42, 0.8);
}
.room-code-value {
font-size: 1.5rem;
font-weight: 800;
font-family: 'Courier New', monospace;
letter-spacing: 0.2em;
color: #1a472a;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}
.room-code-copy {
background: rgba(26, 71, 42, 0.2);
border: none;
border-radius: 6px;
padding: 6px 8px;
cursor: pointer;
font-size: 1rem;
transition: all 0.2s;
}
.room-code-copy:hover {
background: rgba(26, 71, 42, 0.3);
transform: scale(1.1);
}
.room-code-copy:active {
transform: scale(0.95);
}
.room-code-copy.copied {
background: rgba(26, 71, 42, 0.4);
}
h1 {
font-size: 3rem;
@@ -153,6 +295,11 @@ input::placeholder {
color: #fff;
}
.btn-success {
background: #27ae60;
color: #fff;
}
.btn-small {
padding: 8px 16px;
font-size: 0.9rem;
@@ -270,6 +417,41 @@ input::placeholder {
cursor: pointer;
}
.radio-group {
display: flex;
flex-direction: column;
gap: 6px;
}
.radio-label {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
font-size: 0.95rem;
font-weight: 500;
}
.radio-label input[type="radio"] {
width: 18px;
height: 18px;
cursor: pointer;
flex-shrink: 0;
}
.radio-label .rule-desc {
width: auto;
margin-left: 0;
opacity: 0.6;
font-weight: 400;
font-size: 0.8rem;
white-space: nowrap;
}
.radio-label .rule-desc::before {
content: "— ";
}
/* Settings */
.settings {
background: rgba(0,0,0,0.2);
@@ -307,8 +489,16 @@ input::placeholder {
justify-self: center;
}
.game-header .mute-btn {
.game-header .header-buttons {
justify-self: end;
display: flex;
align-items: center;
gap: 10px;
}
#leave-game-btn {
padding: 6px 12px;
font-size: 0.8rem;
}
.mute-btn {
@@ -327,6 +517,39 @@ input::placeholder {
background: rgba(255,255,255,0.1);
}
/* Active Rules Bar */
.active-rules-bar {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 6px 20px;
background: rgba(0, 0, 0, 0.25);
font-size: 0.8rem;
flex-wrap: wrap;
}
.active-rules-bar .rules-label {
color: rgba(255, 255, 255, 0.5);
font-weight: 500;
}
.active-rules-bar .rules-list {
display: flex;
gap: 6px;
flex-wrap: wrap;
justify-content: center;
}
.active-rules-bar .rule-tag {
background: rgba(244, 164, 96, 0.25);
color: #f4a460;
padding: 2px 8px;
border-radius: 4px;
font-size: 0.75rem;
font-weight: 500;
}
/* Card Styles */
.card {
width: clamp(65px, 5.5vw, 100px);
@@ -349,10 +572,19 @@ input::placeholder {
}
.card-back {
background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
border: 3px solid #1a252f;
/* Bee-style diamond grid pattern - red with white crosshatch */
background-color: #c41e3a;
background-image:
linear-gradient(45deg, rgba(255,255,255,0.25) 25%, transparent 25%),
linear-gradient(-45deg, rgba(255,255,255,0.25) 25%, transparent 25%),
linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.25) 75%),
linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.25) 75%);
background-size: 8px 8px;
background-position: 0 0, 0 4px, 4px -4px, -4px 0;
border: 3px solid #8b1528;
color: #fff;
font-size: 0.8rem;
font-size: clamp(1.8rem, 2.5vw, 3rem);
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.card-front {
@@ -402,7 +634,7 @@ input::placeholder {
display: flex;
flex-direction: column;
align-items: center;
gap: 5px;
gap: 25px;
width: 100%;
}
@@ -510,10 +742,16 @@ input::placeholder {
.deck-area {
display: flex;
gap: 12px;
gap: 15px;
align-items: center;
}
.deck-area .card {
width: clamp(80px, 7vw, 120px);
height: clamp(112px, 9.8vw, 168px);
font-size: clamp(2.4rem, 3.2vw, 4rem);
}
#discard {
background: rgba(255,255,255,0.1);
border: 2px dashed rgba(255,255,255,0.3);
@@ -537,6 +775,29 @@ input::placeholder {
box-shadow: none;
}
/* Card flip animation for discard pile */
.card-flip-in {
animation: cardFlipIn 0.4s ease-out;
}
@keyframes cardFlipIn {
0% {
transform: scale(1.3) rotateY(90deg);
opacity: 0.5;
box-shadow: 0 0 30px rgba(244, 164, 96, 0.8);
}
50% {
transform: scale(1.15) rotateY(0deg);
opacity: 1;
box-shadow: 0 0 25px rgba(244, 164, 96, 0.6);
}
100% {
transform: scale(1) rotateY(0deg);
opacity: 1;
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
}
#drawn-card-area {
display: flex;
flex-direction: column;
@@ -547,6 +808,11 @@ input::placeholder {
border-radius: 8px;
}
#drawn-card-area .card {
width: clamp(80px, 7vw, 120px);
height: clamp(112px, 9.8vw, 168px);
font-size: clamp(2.4rem, 3.2vw, 4rem);
}
#drawn-card-area .btn {
white-space: nowrap;
@@ -585,6 +851,19 @@ input::placeholder {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: flex;
justify-content: space-between;
align-items: center;
}
.opponent-showing {
font-weight: 700;
color: rgba(255, 255, 255, 0.9);
background: rgba(0, 0, 0, 0.25);
padding: 1px 6px;
border-radius: 3px;
font-size: 0.9em;
margin-left: 8px;
}
.opponent-area .card-grid {
@@ -678,9 +957,9 @@ input::placeholder {
position: fixed;
bottom: 20px;
background: linear-gradient(145deg, rgba(15, 50, 35, 0.92) 0%, rgba(8, 30, 20, 0.95) 100%);
border-radius: 14px;
padding: 16px 18px;
width: 235px;
border-radius: 16px;
padding: 18px 20px;
width: 263px;
z-index: 100;
backdrop-filter: blur(10px);
border: 1px solid rgba(244, 164, 96, 0.25);
@@ -699,69 +978,81 @@ input::placeholder {
}
.side-panel > h4 {
font-size: 0.9rem;
font-size: 1rem;
text-align: center;
margin-bottom: 12px;
margin-bottom: 14px;
color: #f4a460;
text-transform: uppercase;
letter-spacing: 0.2em;
font-weight: 700;
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
border-bottom: 1px solid rgba(244, 164, 96, 0.2);
padding-bottom: 10px;
padding-bottom: 12px;
}
/* Standings list */
.standings-list {
font-size: 0.95rem;
/* Standings list - two sections, top 4 each */
.standings-section {
margin-bottom: 10px;
}
.standings-list .standing-row {
display: flex;
justify-content: space-between;
.standings-section:last-child {
margin-bottom: 0;
}
.standings-title {
font-size: 0.7rem;
color: rgba(255,255,255,0.5);
text-transform: uppercase;
letter-spacing: 0.1em;
padding-bottom: 3px;
margin-bottom: 3px;
border-bottom: 1px solid rgba(255,255,255,0.1);
}
.standings-list .rank-row {
display: grid;
grid-template-columns: 22px 1fr 36px;
gap: 4px;
font-size: 0.8rem;
padding: 2px 0;
align-items: center;
padding: 6px 8px;
border-radius: 5px;
margin-bottom: 4px;
}
.standings-list .standing-row.leader {
background: rgba(244, 164, 96, 0.2);
border-left: 3px solid #f4a460;
.standings-list .rank-pos {
text-align: center;
font-size: 0.75rem;
}
.standings-list .standing-row.you {
background: rgba(255, 255, 255, 0.1);
}
.standings-list .standing-pos {
font-weight: 700;
color: #f4a460;
width: 20px;
}
.standings-list .standing-name {
flex: 1;
.standings-list .rank-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.standings-list .standing-score {
font-weight: 600;
opacity: 0.9;
.standings-list .rank-val {
text-align: right;
font-size: 0.75rem;
color: rgba(255,255,255,0.7);
}
.standings-list .rank-row.leader {
color: #f4a460;
}
.standings-list .rank-row.leader .rank-val {
color: #f4a460;
}
/* Score table */
.side-panel table {
width: 100%;
border-collapse: collapse;
font-size: 0.9rem;
font-size: 1rem;
}
.side-panel th,
.side-panel td {
padding: 7px 5px;
padding: 8px 6px;
text-align: center;
border-bottom: 1px solid rgba(255,255,255,0.08);
}
@@ -769,7 +1060,7 @@ input::placeholder {
.side-panel th {
font-weight: 600;
background: rgba(0,0,0,0.25);
font-size: 0.75rem;
font-size: 0.85rem;
text-transform: uppercase;
letter-spacing: 0.05em;
color: rgba(255, 255, 255, 0.6);
@@ -790,62 +1081,62 @@ input::placeholder {
}
.game-buttons {
margin-top: 10px;
margin-top: 12px;
display: flex;
flex-direction: column;
gap: 6px;
gap: 8px;
}
.game-buttons .btn {
font-size: 0.7rem;
padding: 8px 10px;
font-size: 0.8rem;
padding: 10px 12px;
width: 100%;
}
/* Rankings Announcement */
.rankings-announcement {
background: linear-gradient(135deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.25) 100%);
border-radius: 8px;
padding: 8px;
margin-bottom: 10px;
border-radius: 10px;
padding: 10px;
margin-bottom: 12px;
border: 1px solid rgba(244, 164, 96, 0.3);
overflow: hidden;
}
.rankings-announcement h3 {
font-size: 0.85rem;
font-size: 0.95rem;
text-align: center;
margin: 0 0 8px 0;
margin: 0 0 10px 0;
color: #f4a460;
}
.rankings-announcement h4 {
font-size: 0.7rem;
font-size: 0.8rem;
text-align: center;
margin: 0 0 5px 0;
margin: 0 0 6px 0;
opacity: 0.8;
}
.rankings-columns {
display: flex;
gap: 6px;
gap: 8px;
}
.ranking-section {
flex: 1;
min-width: 0;
background: rgba(0,0,0,0.2);
border-radius: 5px;
padding: 5px;
border-radius: 6px;
padding: 6px;
overflow: hidden;
}
.rank-row {
display: flex;
align-items: center;
font-size: 0.7rem;
padding: 2px 0;
gap: 2px;
font-size: 0.8rem;
padding: 3px 0;
gap: 3px;
flex-wrap: nowrap;
}
@@ -855,7 +1146,7 @@ input::placeholder {
}
.rank-pos {
width: 16px;
width: 18px;
text-align: center;
flex-shrink: 0;
}
@@ -869,7 +1160,7 @@ input::placeholder {
}
.rank-val {
font-size: 0.6rem;
font-size: 0.7rem;
opacity: 0.9;
flex-shrink: 0;
white-space: nowrap;
@@ -881,11 +1172,11 @@ input::placeholder {
background: linear-gradient(135deg, #ffd700 0%, #f4a460 50%, #ffd700 100%);
color: #1a472a;
text-align: center;
padding: 8px;
border-radius: 6px;
padding: 10px;
border-radius: 8px;
font-weight: 700;
font-size: 0.9rem;
margin-bottom: 8px;
font-size: 1rem;
margin-bottom: 10px;
animation: victoryPulse 1s ease-in-out infinite alternate;
text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}
@@ -1198,15 +1489,15 @@ input::placeholder {
min-width: 100px;
}
/* House Rules Section */
.house-rules-section {
/* Advanced Options Section */
.advanced-options-section {
background: rgba(0, 0, 0, 0.15);
border-radius: 8px;
margin: 15px 0;
overflow: hidden;
}
.house-rules-section summary {
.advanced-options-section summary {
padding: 12px 15px;
cursor: pointer;
font-weight: 600;
@@ -1218,69 +1509,103 @@ input::placeholder {
gap: 8px;
}
.house-rules-section summary::-webkit-details-marker {
.advanced-options-section summary::-webkit-details-marker {
display: none;
}
.house-rules-section summary::before {
.advanced-options-section summary::before {
content: "▸";
font-size: 0.8rem;
transition: transform 0.2s;
}
.house-rules-section[open] summary::before {
.advanced-options-section[open] summary::before {
transform: rotate(90deg);
}
.house-rules-section summary:hover {
.advanced-options-section summary:hover {
background: rgba(0, 0, 0, 0.3);
}
.house-rules-category {
padding: 12px 15px;
/* Two-column grid for options */
.advanced-options-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0;
}
.options-column {
padding: 8px 12px;
}
.options-column:first-child {
border-right: 1px solid rgba(255, 255, 255, 0.1);
}
.options-category {
padding: 8px 0;
border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.house-rules-category h4 {
font-size: 0.85rem;
margin-bottom: 10px;
.options-category:first-child {
border-top: none;
}
.options-category h4 {
font-size: 0.8rem;
margin-bottom: 8px;
opacity: 0.9;
color: #f4a460;
}
.house-rules-category .checkbox-group {
gap: 6px;
.options-category .checkbox-group {
gap: 4px;
}
.house-rules-category .checkbox-label {
font-size: 0.85rem;
padding: 5px 0;
.options-category .checkbox-label {
font-size: 0.95rem;
font-weight: 500;
padding: 3px 0;
flex-wrap: wrap;
}
/* Inline checkbox labels - description on same line */
.checkbox-label.inline {
flex-wrap: nowrap;
}
.checkbox-label.inline .rule-desc {
width: auto;
margin-left: 0;
}
.checkbox-label.inline .rule-desc::before {
content: "— ";
}
/* Rule description */
.rule-desc {
width: 100%;
font-size: 0.7rem;
opacity: 0.7;
margin-left: 22px;
font-size: 0.8rem;
opacity: 0.6;
margin-left: 30px;
margin-top: 1px;
}
/* Compact form group for house rules */
.house-rules-category .form-group.compact {
/* Compact form group for options */
.options-category .form-group.compact {
margin: 0;
}
.house-rules-category .form-group.compact select {
.options-category .form-group.compact select {
width: 100%;
font-size: 0.8rem;
padding: 6px 8px;
font-size: 0.75rem;
padding: 5px 6px;
}
/* Eagle Eye option under joker dropdown */
.eagle-eye-option {
margin-top: 8px;
margin-top: 6px;
}
/* Disabled checkbox styling */
@@ -1292,3 +1617,191 @@ input::placeholder {
.checkbox-label input:disabled {
cursor: not-allowed;
}
/* Mobile: stack columns */
@media (max-width: 500px) {
.advanced-options-grid {
grid-template-columns: 1fr;
}
.options-column:first-child {
border-right: none;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
}
/* Final Results Modal */
.final-results-modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.85);
display: flex;
align-items: center;
justify-content: center;
z-index: 300;
animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.final-results-content {
background: linear-gradient(145deg, #1a472a 0%, #0d3320 100%);
border-radius: 20px;
padding: 30px 40px;
max-width: 550px;
width: 90%;
text-align: center;
box-shadow:
0 20px 60px rgba(0, 0, 0, 0.6),
0 0 80px rgba(244, 164, 96, 0.15),
inset 0 1px 0 rgba(255, 255, 255, 0.1);
border: 2px solid rgba(244, 164, 96, 0.3);
animation: modalSlideIn 0.4s ease;
}
@keyframes modalSlideIn {
from {
opacity: 0;
transform: scale(0.9) translateY(-20px);
}
to {
opacity: 1;
transform: scale(1) translateY(0);
}
}
.final-results-content h2 {
font-size: 2rem;
margin-bottom: 20px;
color: #f4a460;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.double-victory-banner {
background: linear-gradient(135deg, #ffd700 0%, #f4a460 50%, #ffd700 100%);
color: #1a472a;
padding: 12px 20px;
border-radius: 10px;
font-size: 1.2rem;
font-weight: 700;
margin-bottom: 20px;
animation: victoryPulse 1s ease-in-out infinite alternate;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}
.final-rankings {
display: flex;
gap: 20px;
margin-bottom: 25px;
}
.final-ranking-section {
flex: 1;
background: rgba(0, 0, 0, 0.25);
border-radius: 12px;
padding: 15px;
border: 1px solid rgba(255, 255, 255, 0.1);
}
.final-ranking-section h3 {
font-size: 0.85rem;
text-transform: uppercase;
letter-spacing: 0.1em;
color: rgba(255, 255, 255, 0.6);
margin-bottom: 12px;
padding-bottom: 8px;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.final-rank-row {
display: flex;
align-items: center;
padding: 8px 10px;
margin-bottom: 4px;
border-radius: 6px;
font-size: 1rem;
transition: background 0.2s;
}
.final-rank-row:nth-child(2) {
background: linear-gradient(90deg, rgba(244, 164, 96, 0.3) 0%, rgba(244, 164, 96, 0.1) 100%);
font-weight: 600;
color: #f4a460;
}
.final-rank-row:nth-child(3) {
background: rgba(192, 192, 192, 0.15);
}
.final-rank-row:nth-child(4) {
background: rgba(205, 127, 50, 0.12);
}
.final-rank-row .rank-pos {
width: 28px;
font-weight: 700;
font-size: 1.1rem;
}
.final-rank-row .rank-name {
flex: 1;
text-align: left;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.final-rank-row .rank-val {
font-weight: 600;
font-size: 0.95rem;
opacity: 0.9;
}
.final-actions {
display: flex;
gap: 12px;
justify-content: center;
flex-wrap: wrap;
}
.final-actions .btn {
min-width: 140px;
padding: 14px 24px;
font-size: 1rem;
}
.final-actions .btn-primary {
box-shadow: 0 4px 15px rgba(244, 164, 96, 0.4);
}
/* Mobile adjustments for final results modal */
@media (max-width: 500px) {
.final-results-content {
padding: 20px 25px;
}
.final-results-content h2 {
font-size: 1.5rem;
}
.final-rankings {
flex-direction: column;
gap: 15px;
}
.final-rank-row {
font-size: 0.9rem;
padding: 6px 8px;
}
.final-actions .btn {
min-width: 120px;
padding: 12px 20px;
}
}