golfgame/client/style.css

2650 lines
52 KiB
CSS

* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
/* Dark emerald pool table felt */
background: linear-gradient(180deg, #0a4528 0%, #0d5030 50%, #0a4528 100%);
min-height: 100vh;
color: #fff;
}
#app {
max-width: 1100px;
margin: 0 auto;
padding: 15px;
min-height: 100vh;
}
/* Game screen uses full width */
#game-screen {
max-width: none;
width: 100vw;
margin-left: calc(-50vw + 50%);
padding: 0;
box-sizing: border-box;
}
.screen {
display: none;
}
.screen.active {
display: block;
}
/* Lobby Screen */
#lobby-screen {
max-width: 400px;
margin: 0 auto;
padding: 20px;
text-align: center;
}
/* Golf title - golf ball with dimples and shine */
.golf-title {
font-size: 1.3em;
font-weight: 800;
letter-spacing: 0.02em;
/* Shiny gradient like a golf ball surface */
background:
/* Dimple pattern - diagonal grid */
radial-gradient(circle at 3px 3px, rgba(0,0,0,0.18) 2px, transparent 2px),
/* Shiny highlight gradient - whiter */
linear-gradient(
135deg,
#ffffff 0%,
#ffffff 25%,
#f5f5f2 50%,
#ffffff 75%,
#f0f0ed 100%
);
background-size: 10px 10px, 100% 100%;
background-position: 0 0, 0 0;
-webkit-background-clip: text;
background-clip: text;
color: transparent;
text-shadow:
2px 2px 4px rgba(0, 0, 0, 0.2),
-1px -1px 0 rgba(255, 255, 255, 0.4);
filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.15));
}
/* Golfer swing animation */
.golfer-swing {
display: inline-block;
transform: scaleX(-1);
animation: golf-swing 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
animation-delay: 0.3s;
}
@keyframes golf-swing {
0% {
transform: scaleX(-1) translateX(0) rotate(0deg);
}
/* Wind up - pull back leg */
30% {
transform: scaleX(-1) translateX(-8px) rotate(-15deg);
}
/* Hold briefly */
40% {
transform: scaleX(-1) translateX(-8px) rotate(-15deg);
}
/* KICK! */
55% {
transform: scaleX(-1) translateX(8px) rotate(20deg);
}
/* Follow through */
80% {
transform: scaleX(-1) translateX(4px) rotate(12deg);
}
/* Final pose - freeze */
100% {
transform: scaleX(-1) translateX(3px) rotate(10deg);
}
}
/* Kicked golf ball - parabolic trajectory */
.kicked-ball {
display: inline-block;
font-size: 0.2em;
position: relative;
opacity: 0;
animation: ball-kicked 0.7s linear forwards;
animation-delay: 0.72s;
}
/* Trajectory: y = 0.0124x² - 1.42x (parabola with peak at x=57) */
@keyframes ball-kicked {
0% {
transform: translate(-12px, 8px) scale(1);
opacity: 1;
}
15% {
transform: translate(8px, -16px) scale(1);
opacity: 1;
}
30% {
transform: translate(28px, -31px) scale(1);
opacity: 1;
}
45% {
transform: translate(48px, -38px) scale(0.95);
opacity: 1;
}
55% {
transform: translate(63px, -38px) scale(0.9);
opacity: 1;
}
70% {
transform: translate(83px, -27px) scale(0.85);
opacity: 0.9;
}
85% {
transform: translate(103px, -6px) scale(0.75);
opacity: 0.6;
}
100% {
transform: translate(118px, 25px) scale(0.65);
opacity: 0;
}
}
#lobby-screen .form-group {
text-align: left;
}
#lobby-screen input {
text-align: center;
font-size: 1.1rem;
}
#lobby-screen #room-code {
text-transform: uppercase;
letter-spacing: 0.3em;
font-weight: 600;
}
/* Waiting Screen */
#waiting-screen {
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;
text-align: center;
margin-bottom: 10px;
text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
.subtitle {
text-align: center;
opacity: 0.8;
margin-bottom: 40px;
}
h2 {
text-align: center;
margin-bottom: 20px;
}
h3 {
margin-bottom: 15px;
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
margin-bottom: 5px;
font-weight: 500;
}
input, select {
width: 100%;
padding: 12px;
border: none;
border-radius: 8px;
font-size: 1rem;
background: rgba(255,255,255,0.9);
color: #333;
}
input::placeholder {
color: #999;
}
.button-group {
margin-bottom: 20px;
}
.btn {
display: inline-block;
padding: 12px 24px;
border: none;
border-radius: 8px;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: transform 0.2s, box-shadow 0.2s;
width: 100%;
}
.btn:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.btn:active {
transform: translateY(0);
}
.btn-primary {
background: #f4a460;
color: #1a472a;
}
/* Pulsing glow for Next Hole button */
#next-round-btn:not(.hidden) {
animation: glow-pulse 1.5s ease-in-out infinite;
}
@keyframes glow-pulse {
0%, 100% {
box-shadow: 0 0 5px rgba(244, 164, 96, 0.4),
0 0 10px rgba(244, 164, 96, 0.2);
}
50% {
box-shadow: 0 0 15px rgba(244, 164, 96, 0.8),
0 0 30px rgba(244, 164, 96, 0.4),
0 0 45px rgba(244, 164, 96, 0.2);
}
}
.btn-secondary {
background: #fff;
color: #1a472a;
}
.btn-danger {
background: #c0392b;
color: #fff;
}
.btn-success {
background: #27ae60;
color: #fff;
}
.btn-small {
padding: 8px 16px;
font-size: 0.9rem;
width: auto;
}
.btn.disabled,
.btn:disabled {
opacity: 0.4;
cursor: not-allowed;
transform: none;
box-shadow: none;
}
/* Waiting state for non-host next hole button */
#next-round-btn.waiting {
animation: none;
background: rgba(244, 164, 96, 0.4);
color: rgba(255, 255, 255, 0.8);
box-shadow: none;
}
.divider {
text-align: center;
margin: 30px 0;
opacity: 0.6;
}
.error {
color: #e74c3c;
text-align: center;
margin-top: 15px;
}
.info {
text-align: center;
opacity: 0.8;
margin: 20px 0;
}
.recommendation {
color: #f4a460;
font-size: 0.8rem;
margin-top: 6px;
padding: 6px 8px;
background: rgba(244, 164, 96, 0.15);
border-radius: 4px;
border-left: 3px solid #f4a460;
}
.hidden {
display: none !important;
}
/* Players List */
.players-list {
background: rgba(0,0,0,0.2);
border-radius: 12px;
padding: 20px;
margin-bottom: 20px;
}
.players-list ul {
list-style: none;
}
.players-list li {
padding: 10px;
background: rgba(255,255,255,0.1);
border-radius: 6px;
margin-bottom: 8px;
display: flex;
justify-content: space-between;
align-items: center;
}
.players-list .host-badge {
background: #f4a460;
color: #1a472a;
padding: 2px 8px;
border-radius: 4px;
font-size: 0.8rem;
font-weight: 600;
}
.players-list .cpu-badge {
background: #3498db;
color: #fff;
padding: 2px 8px;
border-radius: 4px;
font-size: 0.8rem;
font-weight: 600;
}
.cpu-style {
font-size: 0.8rem;
opacity: 0.7;
font-style: italic;
}
.cpu-controls {
display: flex;
gap: 10px;
}
.checkbox-group {
display: flex;
flex-direction: column;
gap: 8px;
}
.checkbox-label {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
font-size: 0.9rem;
}
.checkbox-label input[type="checkbox"] {
width: 18px;
height: 18px;
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);
border-radius: 12px;
padding: 20px;
margin-bottom: 20px;
}
/* Game Screen */
.game-header {
display: grid;
grid-template-columns: 1fr 2fr 1fr;
align-items: center;
padding: 10px 20px;
background: rgba(0,0,0,0.35);
font-size: 0.9rem;
width: 100vw;
margin-left: calc(-50vw + 50%);
box-sizing: border-box;
}
.header-col {
display: flex;
align-items: center;
}
.header-col-left {
justify-content: flex-start;
gap: 12px;
}
.header-col-center {
justify-content: center;
display: flex;
align-items: center;
gap: 10px;
}
.header-col-right {
justify-content: flex-end;
gap: 8px;
}
.game-header .round-info {
font-weight: 600;
white-space: nowrap;
}
#leave-game-btn {
padding: 6px 12px;
font-size: 0.8rem;
}
.mute-btn {
background: transparent;
border: none;
font-size: 1.1rem;
cursor: pointer;
padding: 2px 6px;
border-radius: 4px;
opacity: 0.8;
transition: opacity 0.2s;
}
.mute-btn:hover {
opacity: 1;
background: rgba(255,255,255,0.1);
}
/* Active Rules (in header) */
.active-rules-bar {
display: flex;
align-items: center;
gap: 6px;
font-size: 0.85rem;
}
.active-rules-bar.hidden {
display: none;
}
.active-rules-bar .rules-label {
color: rgba(255, 255, 255, 0.5);
font-weight: 500;
}
.active-rules-bar .rules-list {
display: flex;
gap: 5px;
flex-wrap: nowrap;
}
.active-rules-bar .rule-tag {
background: rgba(244, 164, 96, 0.3);
color: #f4a460;
padding: 2px 8px;
border-radius: 4px;
font-size: 0.75rem;
font-weight: 600;
}
.active-rules-bar .rule-tag.standard {
background: rgba(255, 255, 255, 0.15);
color: rgba(255, 255, 255, 0.7);
}
.active-rules-bar .rule-tag.rule-more {
background: rgba(255, 255, 255, 0.1);
color: rgba(255, 255, 255, 0.6);
cursor: help;
border: 1px dashed rgba(255, 255, 255, 0.3);
}
.active-rules-bar .rule-tag.rule-more:hover {
background: rgba(255, 255, 255, 0.2);
color: rgba(255, 255, 255, 0.9);
}
/* Card Styles */
.card {
width: clamp(65px, 5.5vw, 100px);
height: clamp(91px, 7.7vw, 140px);
border-radius: 6px;
display: flex;
align-items: center;
justify-content: center;
font-size: clamp(2rem, 2.5vw, 3.2rem);
font-weight: bold;
cursor: pointer;
transition: transform 0.2s, box-shadow 0.2s;
position: relative;
user-select: none;
}
.card:hover {
transform: scale(1.05);
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.card-back {
/* 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: clamp(1.8rem, 2.5vw, 3rem);
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.card-front {
background: #fff;
border: 2px solid #ddd;
color: #333;
}
.card-front.red {
color: #c0392b;
}
.card-front.black {
color: #2c3e50;
}
.card-front.joker {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 2px;
}
.card-front.joker .joker-icon {
font-size: 1.6em;
line-height: 1;
}
.card-front.joker .joker-label {
font-size: 0.45em;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
color: #9b59b6;
}
.card.clickable {
cursor: pointer;
box-shadow: 0 0 0 2px rgba(244, 164, 96, 0.5);
}
.card.clickable:hover {
box-shadow: 0 0 0 3px #f4a460;
}
/* Disable hover effects when not player's turn */
#game-screen.not-my-turn .card {
cursor: default;
}
#game-screen.not-my-turn .card:hover {
transform: none;
box-shadow: none;
}
#game-screen.not-my-turn #deck,
#game-screen.not-my-turn #discard {
cursor: default;
}
#game-screen.not-my-turn #deck:hover,
#game-screen.not-my-turn #discard:hover {
transform: none;
box-shadow: none;
}
.card.selected,
.card.clickable.selected {
box-shadow: 0 0 0 4px #fff, 0 0 12px 4px #f4a460;
transform: scale(1.08);
}
/* Card Grid */
.card-grid {
display: grid;
grid-template-columns: repeat(3, clamp(65px, 5.5vw, 100px));
gap: clamp(8px, 0.8vw, 14px);
justify-content: center;
}
/* Game Table Layout */
.game-table {
display: flex;
flex-direction: column;
align-items: center;
gap: 25px;
width: 100%;
}
/* Player row - deck/discard and player cards side by side */
.player-row {
display: flex;
justify-content: center;
align-items: center;
gap: 25px;
width: 100%;
flex-wrap: wrap;
}
.opponents-row {
display: flex;
flex-wrap: nowrap;
justify-content: center;
align-items: flex-end;
gap: clamp(12px, 1.8vw, 35px);
min-height: clamp(120px, 14vw, 200px);
padding: 0 20px;
width: 100%;
}
/* Arch layout - middle items higher, edges lower with rotation for "around the table" feel */
.opponents-row .opponent-area {
flex-shrink: 0;
transition: transform 0.3s ease;
}
/* 2 opponents: slight rotation toward center */
.opponents-row .opponent-area:first-child:nth-last-child(2) {
margin-bottom: 15px;
transform: rotate(-4deg);
}
.opponents-row .opponent-area:first-child:nth-last-child(2) ~ .opponent-area {
margin-bottom: 15px;
transform: rotate(4deg);
}
/* 3 opponents: middle higher, edges rotated toward center */
.opponents-row .opponent-area:first-child:nth-last-child(3) {
margin-bottom: 0;
transform: rotate(-6deg);
}
.opponents-row .opponent-area:first-child:nth-last-child(3) ~ .opponent-area:not(:last-child) {
margin-bottom: 35px;
transform: rotate(0deg);
}
.opponents-row .opponent-area:first-child:nth-last-child(3) ~ .opponent-area:last-child {
margin-bottom: 0;
transform: rotate(6deg);
}
/* 4 opponents: arch shape with rotation toward center */
.opponents-row .opponent-area:first-child:nth-last-child(4) {
margin-bottom: 0;
transform: rotate(-8deg);
}
.opponents-row .opponent-area:first-child:nth-last-child(4) ~ .opponent-area:nth-child(2) {
margin-bottom: 30px;
transform: rotate(-3deg);
}
.opponents-row .opponent-area:first-child:nth-last-child(4) ~ .opponent-area:nth-child(3) {
margin-bottom: 30px;
transform: rotate(3deg);
}
.opponents-row .opponent-area:first-child:nth-last-child(4) ~ .opponent-area:last-child {
margin-bottom: 0;
transform: rotate(8deg);
}
/* 5 opponents: deeper arch with graduated rotation toward center */
.opponents-row .opponent-area:first-child:nth-last-child(5) {
margin-bottom: 0;
transform: rotate(-10deg);
}
.opponents-row .opponent-area:first-child:nth-last-child(5) ~ .opponent-area:nth-child(2) {
margin-bottom: 25px;
transform: rotate(-5deg);
}
.opponents-row .opponent-area:first-child:nth-last-child(5) ~ .opponent-area:nth-child(3) {
margin-bottom: 40px;
transform: rotate(0deg);
}
.opponents-row .opponent-area:first-child:nth-last-child(5) ~ .opponent-area:nth-child(4) {
margin-bottom: 25px;
transform: rotate(5deg);
}
.opponents-row .opponent-area:first-child:nth-last-child(5) ~ .opponent-area:last-child {
margin-bottom: 0;
transform: rotate(10deg);
}
.table-center {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 10px;
background: rgba(0,0,0,0.15);
padding: 15px 20px;
border-radius: 12px;
}
.deck-area {
display: flex;
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);
}
#discard.has-card {
background: #fff;
border: 2px solid #ddd;
}
/* Holding state - when player has drawn a card */
#discard.holding {
background: #fff;
border: 3px solid #f4a460;
box-shadow: 0 0 15px rgba(244, 164, 96, 0.6);
transform: scale(1.05);
}
.discard-stack {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
}
.discard-stack .btn {
white-space: nowrap;
}
#deck.disabled,
#discard.disabled {
opacity: 0.5;
cursor: not-allowed;
filter: grayscale(50%);
}
#deck.disabled:hover,
#discard.disabled:hover {
transform: none;
box-shadow: none;
}
/* Pulse animation when opponent draws from a pile */
#deck.draw-pulse,
#discard.draw-pulse {
animation: draw-pulse 0.6s ease-out;
}
@keyframes draw-pulse {
0% {
box-shadow: 0 0 0 0 rgba(244, 164, 96, 0.8);
}
50% {
box-shadow: 0 0 0 12px rgba(244, 164, 96, 0.4);
}
100% {
box-shadow: 0 0 0 20px rgba(244, 164, 96, 0);
}
}
/* Card flip animation for discard pile */
.card-flip-in {
animation: cardFlipIn 0.5s ease-out;
}
@keyframes cardFlipIn {
0% {
transform: scale(1.4) translateY(-20px);
opacity: 0;
box-shadow: 0 0 40px rgba(244, 164, 96, 1);
}
30% {
transform: scale(1.25) translateY(-10px);
opacity: 1;
box-shadow: 0 0 35px rgba(244, 164, 96, 0.9);
}
70% {
transform: scale(1.1) translateY(0);
box-shadow: 0 0 20px rgba(244, 164, 96, 0.5);
}
100% {
transform: scale(1) translateY(0);
opacity: 1;
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
}
/* Swap animation overlay */
.swap-animation {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 1000;
perspective: 1000px;
}
.swap-animation.hidden {
display: none;
}
.swap-card {
position: absolute;
width: 70px;
height: 98px;
perspective: 1000px;
}
.swap-card-inner {
position: relative;
width: 100%;
height: 100%;
transform-style: preserve-3d;
transition: transform 0.4s ease-in-out;
}
.swap-card.flipping .swap-card-inner {
transform: rotateY(180deg);
}
.swap-card-front,
.swap-card-back {
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}
.swap-card-back {
background: linear-gradient(135deg, #c0392b 0%, #922b21 100%);
color: rgba(255,255,255,0.4);
font-size: 2rem;
}
.swap-card-front {
background: linear-gradient(145deg, #fff 0%, #f0f0f0 100%);
transform: rotateY(180deg);
font-size: 2rem;
flex-direction: column;
color: #2c3e50;
line-height: 1.1;
font-weight: bold;
}
.swap-card-front.red {
color: #e74c3c;
}
.swap-card-front.black {
color: #2c3e50;
}
.swap-card-front.joker {
color: #9b59b6;
}
.swap-card-front .joker-icon {
font-size: 1.6em;
line-height: 1;
}
.swap-card-front .joker-label {
font-size: 0.45em;
font-weight: 700;
text-transform: uppercase;
}
/* Movement animation */
.swap-card.flipping {
filter: drop-shadow(0 0 20px rgba(244, 164, 96, 0.8));
}
.swap-card.moving {
transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1), left 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s ease-out;
transform: scale(1.1) rotate(-5deg);
filter: drop-shadow(0 0 25px rgba(244, 164, 96, 1));
}
/* Card in hand fading during swap */
.card.swap-out {
opacity: 0;
transition: opacity 0.1s;
}
/* Discard fading during swap */
#discard.swap-to-hand {
opacity: 0;
transition: opacity 0.2s;
}
/* Player Area */
.player-section {
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
gap: 0;
}
.player-area {
background: rgba(0,0,0,0.2);
border-radius: 8px;
padding: 10px 15px;
text-align: center;
}
/* Opponent Areas */
.opponent-area {
background: rgba(0,0,0,0.2);
border-radius: 8px;
padding: clamp(4px, 0.5vw, 10px) clamp(6px, 0.7vw, 14px) clamp(6px, 0.7vw, 14px);
text-align: center;
}
.opponent-area h4 {
font-size: clamp(0.7rem, 0.8vw, 1rem);
margin: 0 0 6px 0;
padding: clamp(3px, 0.35vw, 6px) clamp(8px, 0.9vw, 14px);
background: rgba(244, 164, 96, 0.5);
border-radius: 4px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: flex;
justify-content: space-between;
align-items: center;
}
.opponent-showing,
.player-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;
}
/* Player area header - matches opponent style */
.player-area h4 {
font-size: clamp(0.8rem, 1vw, 1.1rem);
margin: 0 0 8px 0;
padding: clamp(4px, 0.4vw, 8px) clamp(10px, 1vw, 16px);
background: rgba(244, 164, 96, 0.6);
border-radius: 4px;
display: flex;
justify-content: space-between;
align-items: center;
}
.opponent-area .card-grid {
display: grid;
grid-template-columns: repeat(3, clamp(45px, 4vw, 75px));
gap: clamp(4px, 0.4vw, 8px);
}
.opponent-area .card {
width: clamp(45px, 4vw, 75px);
height: clamp(63px, 5.6vw, 105px);
font-size: clamp(1.3rem, 1.5vw, 2.2rem);
border-radius: 5px;
}
.opponent-area.current-turn {
background: rgba(244, 164, 96, 0.3);
box-shadow: 0 0 0 2px #f4a460;
}
/* Round winner highlight */
.opponent-area.round-winner h4,
.player-area.round-winner h4 {
background: rgba(180, 255, 80, 0.85);
color: #1a1a1a;
}
.winner-crown {
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
margin-right: 3px;
}
/* Status message in header */
.status-message {
padding: 6px 16px;
border-radius: 4px;
font-size: 0.9rem;
font-weight: 600;
text-align: center;
white-space: nowrap;
color: #fff;
}
.status-message.your-turn {
background: linear-gradient(135deg, #f4a460 0%, #e8914d 100%);
color: #1a472a;
}
/* Final turn badge - separate indicator */
.final-turn-badge {
background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
color: #fff;
padding: 6px 14px;
border-radius: 4px;
font-size: 0.85rem;
font-weight: 700;
letter-spacing: 0.05em;
animation: pulse-subtle 2s ease-in-out infinite;
}
.final-turn-badge.hidden {
display: none;
}
@keyframes pulse-subtle {
0%, 100% {
box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
}
50% {
box-shadow: 0 0 0 4px rgba(220, 38, 38, 0);
}
}
@keyframes toastIn {
from { opacity: 0; }
to { opacity: 1; }
}
/* Flip prompt */
.flip-prompt {
background: linear-gradient(135deg, #f4a460 0%, #e8914d 100%);
color: #1a472a;
padding: 6px 16px;
border-radius: 4px;
font-size: 0.8rem;
font-weight: 600;
text-align: center;
white-space: nowrap;
}
.flip-prompt.hidden {
display: none;
}
/* Game screen layout */
#game-screen.active {
display: flex;
flex-direction: column;
align-items: center;
position: relative;
padding: 10px;
}
.game-layout {
display: flex;
justify-content: center;
width: 100%;
align-items: flex-start;
}
.game-main {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
width: 100%;
}
/* Side Panels - positioned in bottom corners */
.side-panel {
position: fixed;
bottom: 15px;
background: linear-gradient(145deg, rgba(15, 50, 35, 0.92) 0%, rgba(8, 30, 20, 0.95) 100%);
border-radius: 10px;
padding: 10px 12px;
width: 200px;
z-index: 100;
backdrop-filter: blur(10px);
border: 1px solid rgba(244, 164, 96, 0.25);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.side-panel.left-panel {
left: 15px;
}
.side-panel.right-panel {
right: 15px;
}
.side-panel > h4 {
font-size: 0.7rem;
text-align: center;
margin-bottom: 8px;
color: #f4a460;
text-transform: uppercase;
letter-spacing: 0.15em;
font-weight: 700;
border-bottom: 1px solid rgba(244, 164, 96, 0.2);
padding-bottom: 6px;
}
/* Standings list - two sections, top 4 each */
.standings-section {
margin-bottom: 6px;
}
.standings-section:last-child {
margin-bottom: 0;
}
.standings-title {
font-size: 0.6rem;
color: rgba(255,255,255,0.5);
text-transform: uppercase;
letter-spacing: 0.1em;
padding-bottom: 2px;
margin-bottom: 2px;
border-bottom: 1px solid rgba(255,255,255,0.1);
}
.standings-list .rank-row {
display: grid;
grid-template-columns: 18px 1fr 30px;
gap: 3px;
font-size: 0.7rem;
padding: 1px 0;
align-items: center;
}
.standings-list .rank-pos {
text-align: center;
font-size: 0.65rem;
}
.standings-list .rank-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.standings-list .rank-val {
text-align: right;
font-size: 0.65rem;
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.75rem;
}
.side-panel th,
.side-panel td {
padding: 4px 3px;
text-align: center;
border-bottom: 1px solid rgba(255,255,255,0.08);
}
.side-panel th {
font-weight: 600;
background: rgba(0,0,0,0.25);
font-size: 0.65rem;
text-transform: uppercase;
letter-spacing: 0.03em;
color: rgba(255, 255, 255, 0.6);
}
.side-panel td:first-child {
text-align: left;
font-weight: 500;
}
.side-panel tr.winner {
background: linear-gradient(90deg, rgba(244, 164, 96, 0.35) 0%, rgba(244, 164, 96, 0.15) 100%);
}
.side-panel tr.current-player {
background: rgba(244, 164, 96, 0.15);
box-shadow: inset 3px 0 0 #f4a460;
}
.game-buttons {
margin-top: 8px;
display: flex;
flex-direction: column;
gap: 5px;
}
.game-buttons .btn {
font-size: 0.7rem;
padding: 6px 8px;
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: 10px;
padding: 10px;
margin-bottom: 12px;
border: 1px solid rgba(244, 164, 96, 0.3);
overflow: hidden;
}
.rankings-announcement h3 {
font-size: 0.95rem;
text-align: center;
margin: 0 0 10px 0;
color: #f4a460;
}
.rankings-announcement h4 {
font-size: 0.8rem;
text-align: center;
margin: 0 0 6px 0;
opacity: 0.8;
}
.rankings-columns {
display: flex;
gap: 8px;
}
.ranking-section {
flex: 1;
min-width: 0;
background: rgba(0,0,0,0.2);
border-radius: 6px;
padding: 6px;
overflow: hidden;
}
.rank-row {
display: flex;
align-items: center;
font-size: 0.8rem;
padding: 3px 0;
gap: 3px;
flex-wrap: nowrap;
}
.rank-row.leader {
color: #f4a460;
font-weight: 600;
}
.rank-pos {
width: 18px;
text-align: center;
flex-shrink: 0;
}
.rank-name {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
min-width: 0;
}
.rank-val {
font-size: 0.7rem;
opacity: 0.9;
flex-shrink: 0;
white-space: nowrap;
text-align: right;
}
/* Double Victory */
.double-victory {
background: linear-gradient(135deg, #ffd700 0%, #f4a460 50%, #ffd700 100%);
color: #1a472a;
text-align: center;
padding: 10px;
border-radius: 8px;
font-weight: 700;
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);
}
@keyframes victoryPulse {
from { box-shadow: 0 0 5px rgba(255, 215, 0, 0.5); }
to { box-shadow: 0 0 15px rgba(255, 215, 0, 0.8); }
}
/* Responsive */
@media (max-width: 700px) {
.game-layout {
flex-direction: column;
}
.scoreboard-panel {
width: 100%;
order: -1;
margin-bottom: 8px;
padding: 8px;
}
.scoreboard-panel > h4 {
cursor: pointer;
user-select: none;
padding: 4px;
margin: -4px -4px 0 -4px;
border-radius: 4px;
}
.scoreboard-panel > h4:hover {
background: rgba(255,255,255,0.1);
}
.scoreboard-panel > h4::after {
content: ' ▼';
font-size: 0.6rem;
}
.scoreboard-panel.collapsed > h4::after {
content: ' ▶';
}
.scoreboard-panel.collapsed > *:not(h4):not(.game-buttons) {
display: none;
}
.scoreboard-panel table {
max-width: 100%;
margin: 8px auto 0;
}
.rankings-announcement {
padding: 8px;
margin-bottom: 8px;
}
.rankings-columns {
flex-direction: row;
gap: 6px;
}
.ranking-section {
padding: 5px;
}
.game-buttons {
flex-direction: row;
justify-content: center;
}
}
@media (max-width: 500px) {
#app {
padding: 6px;
}
h1 {
font-size: 2rem;
}
.card {
width: 55px;
height: 77px;
font-size: 1.2rem;
}
.card-grid {
grid-template-columns: repeat(3, 55px);
gap: 6px;
}
.opponent-area .card {
width: 38px;
height: 53px;
font-size: 0.75rem;
}
.opponent-area .card-grid {
grid-template-columns: repeat(3, 38px);
gap: 3px;
}
.opponents-row {
min-height: 100px;
gap: 8px;
}
/* Reduce arch heights and rotations on mobile */
.opponents-row .opponent-area:first-child:nth-last-child(2),
.opponents-row .opponent-area:first-child:nth-last-child(2) ~ .opponent-area {
transform: rotate(0deg);
}
.opponents-row .opponent-area:first-child:nth-last-child(3) {
transform: rotate(-4deg);
}
.opponents-row .opponent-area:first-child:nth-last-child(3) ~ .opponent-area:not(:last-child) {
margin-bottom: 22px;
}
.opponents-row .opponent-area:first-child:nth-last-child(3) ~ .opponent-area:last-child {
transform: rotate(4deg);
}
.opponents-row .opponent-area:first-child:nth-last-child(4) {
transform: rotate(-5deg);
}
.opponents-row .opponent-area:first-child:nth-last-child(4) ~ .opponent-area:nth-child(2),
.opponents-row .opponent-area:first-child:nth-last-child(4) ~ .opponent-area:nth-child(3) {
margin-bottom: 18px;
transform: rotate(0deg);
}
.opponents-row .opponent-area:first-child:nth-last-child(4) ~ .opponent-area:last-child {
transform: rotate(5deg);
}
.opponents-row .opponent-area:first-child:nth-last-child(5) {
transform: rotate(-6deg);
}
.opponents-row .opponent-area:first-child:nth-last-child(5) ~ .opponent-area:nth-child(2),
.opponents-row .opponent-area:first-child:nth-last-child(5) ~ .opponent-area:nth-child(4) {
margin-bottom: 15px;
transform: rotate(0deg);
}
.opponents-row .opponent-area:first-child:nth-last-child(5) ~ .opponent-area:nth-child(3) {
margin-bottom: 25px;
}
.opponents-row .opponent-area:first-child:nth-last-child(5) ~ .opponent-area:last-child {
transform: rotate(6deg);
}
.game-header {
flex-direction: column;
text-align: center;
gap: 3px;
}
.table-center {
padding: 10px 15px;
}
.player-row {
flex-direction: column;
gap: 10px;
}
}
/* Suit symbols */
.suit-hearts::after { content: "♥"; }
.suit-diamonds::after { content: "♦"; }
.suit-clubs::after { content: "♣"; }
.suit-spades::after { content: "♠"; }
/* ============================================
New Card System - Persistent Card Elements
============================================ */
/* Card Layer - container for all persistent cards */
#card-layer {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 500;
perspective: 1000px;
}
#card-layer .real-card {
pointer-events: auto;
}
/* Card Slot - only used when USE_NEW_CARD_SYSTEM is true */
.card-slot {
display: none;
}
/* Real Card - persistent card element with 3D structure */
.real-card {
position: fixed;
border-radius: 6px;
perspective: 1000px;
z-index: 501;
cursor: pointer;
transition: box-shadow 0.2s, opacity 0.2s;
}
.real-card:hover {
z-index: 510;
}
.real-card .card-inner {
position: relative;
width: 100%;
height: 100%;
transform-style: preserve-3d;
transition: transform 0.4s ease-in-out;
}
.real-card .card-inner.flipped {
transform: rotateY(180deg);
}
.real-card .card-face {
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
border-radius: 6px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-weight: bold;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
/* Card Front */
.real-card .card-face-front {
background: linear-gradient(145deg, #fff 0%, #f5f5f5 100%);
border: 2px solid #ddd;
color: #333;
font-size: clamp(1.8rem, 2.2vw, 2.8rem);
line-height: 1.1;
}
.real-card .card-face-front.red {
color: #c0392b;
}
.real-card .card-face-front.black {
color: #2c3e50;
}
.real-card .card-face-front.joker {
color: #9b59b6;
}
.real-card .card-face-front .joker-icon {
font-size: 1.5em;
line-height: 1;
}
.real-card .card-face-front .joker-label {
font-size: 0.4em;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
}
/* Card Back */
.real-card .card-face-back {
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: rgba(255, 255, 255, 0.5);
font-size: clamp(1.8rem, 2.5vw, 3rem);
transform: rotateY(180deg);
}
/* Card States */
.real-card.moving,
.real-card.anim-card.moving {
z-index: 600;
transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
top 0.3s cubic-bezier(0.4, 0, 0.2, 1),
transform 0.3s ease-out;
filter: drop-shadow(0 0 20px rgba(244, 164, 96, 0.8));
transform: scale(1.08) rotate(-3deg);
}
/* Animation card - temporary cards used for animations */
.real-card.anim-card {
z-index: 700;
pointer-events: none;
}
.real-card.anim-card .card-inner {
transition: transform 0.4s ease-in-out;
}
.real-card.holding {
z-index: 550;
box-shadow: 0 0 20px rgba(244, 164, 96, 0.6),
0 4px 15px rgba(0, 0, 0, 0.4);
transform: scale(1.08);
}
.real-card.clickable {
box-shadow: 0 0 0 2px rgba(244, 164, 96, 0.5);
}
.real-card.clickable:hover {
box-shadow: 0 0 0 3px #f4a460,
0 4px 12px rgba(0, 0, 0, 0.3);
transform: scale(1.02);
}
/* Disable hover effects when not player's turn */
#game-screen.not-my-turn .real-card {
cursor: default;
}
#game-screen.not-my-turn .real-card:hover {
transform: none;
}
}
.real-card.selected {
box-shadow: 0 0 0 4px #fff, 0 0 15px 5px #f4a460;
transform: scale(1.06);
z-index: 520;
}
.real-card.drawing {
z-index: 590;
}
/* Deck card styling in new system */
#deck.new-system {
cursor: pointer;
position: relative;
}
/* Discard styling for new system */
#discard.new-system.holding {
box-shadow: none;
background: rgba(255, 255, 255, 0.1);
border: 2px dashed rgba(244, 164, 96, 0.5);
}
/* Modal */
.modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.7);
display: flex;
align-items: center;
justify-content: center;
z-index: 200;
}
.modal.hidden {
display: none;
}
.modal-content {
background: linear-gradient(135deg, #1a472a 0%, #2d5a3d 100%);
border-radius: 12px;
padding: 15px;
max-width: 700px;
width: 95%;
max-height: 90vh;
overflow-y: auto;
}
.modal-content h3 {
text-align: center;
margin-bottom: 10px;
font-size: 1.1rem;
}
/* CPU Profile Grid */
.profiles-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 8px;
margin-bottom: 12px;
}
.profile-card {
background: rgba(255, 255, 255, 0.1);
border: 2px solid transparent;
border-radius: 6px;
padding: 8px 6px;
cursor: pointer;
transition: all 0.2s;
text-align: center;
position: relative;
}
.profile-card:hover {
background: rgba(255, 255, 255, 0.2);
border-color: rgba(244, 164, 96, 0.5);
}
.profile-card.unavailable {
opacity: 0.4;
cursor: not-allowed;
}
.profile-card.unavailable:hover {
background: rgba(255, 255, 255, 0.1);
border-color: transparent;
}
.profile-card.selected {
background: rgba(244, 164, 96, 0.3);
border-color: #f4a460;
box-shadow: 0 0 8px rgba(244, 164, 96, 0.5);
}
.profile-card.selected:hover {
background: rgba(244, 164, 96, 0.4);
}
.profile-checkbox {
position: absolute;
top: 6px;
right: 6px;
width: 20px;
height: 20px;
border: 2px solid rgba(255,255,255,0.4);
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
font-weight: bold;
color: #1a472a;
background: rgba(255,255,255,0.1);
}
.profile-card.selected .profile-checkbox {
background: #f4a460;
border-color: #f4a460;
}
.profile-avatar {
width: 50px;
height: 50px;
margin: 0 auto 8px;
border-radius: 50%;
background: rgba(255,255,255,0.15);
overflow: hidden;
}
.profile-avatar svg {
width: 100%;
height: 100%;
}
.profile-card .profile-name {
font-size: 1.1rem;
font-weight: 600;
margin-bottom: 4px;
}
.profile-card .profile-style {
font-size: 0.85rem;
opacity: 0.8;
font-style: italic;
}
.profile-card .profile-in-game {
font-size: 0.75rem;
color: #f4a460;
margin-top: 4px;
}
.modal-buttons {
display: flex;
gap: 10px;
justify-content: center;
}
.modal-buttons .btn {
min-width: 100px;
}
/* Advanced Options Section */
.advanced-options-section {
background: rgba(0, 0, 0, 0.15);
border-radius: 8px;
margin: 15px 0;
overflow: hidden;
}
.advanced-options-section summary {
padding: 12px 15px;
cursor: pointer;
font-weight: 600;
font-size: 0.95rem;
background: rgba(0, 0, 0, 0.2);
list-style: none;
display: flex;
align-items: center;
gap: 8px;
}
.advanced-options-section summary::-webkit-details-marker {
display: none;
}
.advanced-options-section summary::before {
content: "▸";
font-size: 0.8rem;
transition: transform 0.2s;
}
.advanced-options-section[open] summary::before {
transform: rotate(90deg);
}
.advanced-options-section summary:hover {
background: rgba(0, 0, 0, 0.3);
}
/* 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);
}
.options-category:first-child {
border-top: none;
}
.options-category h4 {
font-size: 0.8rem;
margin-bottom: 8px;
opacity: 0.9;
color: #f4a460;
}
.options-category .checkbox-group {
gap: 4px;
}
.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.8rem;
opacity: 0.6;
margin-left: 30px;
margin-top: 1px;
}
/* Compact form group for options */
.options-category .form-group.compact {
margin: 0;
}
.options-category .form-group.compact select {
width: 100%;
font-size: 0.75rem;
padding: 5px 6px;
}
/* Eagle Eye option under joker dropdown */
.eagle-eye-option {
margin-top: 6px;
}
/* Disabled checkbox styling */
.checkbox-label:has(input:disabled) {
opacity: 0.5;
cursor: not-allowed;
}
.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;
}
}
/* ===========================================
RULES SCREEN
=========================================== */
#rules-screen {
max-width: 800px;
margin: 0 auto;
padding: 10px 20px;
width: auto;
margin-left: auto;
margin-right: auto;
}
#rules-screen.active {
display: block;
}
#rules-screen h1 {
margin-top: 0;
}
.rules-container {
background: rgba(0, 0, 0, 0.3);
border-radius: 12px;
padding: 20px 35px;
border: 1px solid rgba(255, 255, 255, 0.1);
margin-top: 0;
}
.rules-container h1 {
text-align: center;
margin-bottom: 30px;
color: #f4a460;
font-size: 2rem;
}
.rules-container .back-btn {
margin-bottom: 20px;
}
.rules-section {
margin-bottom: 35px;
padding-bottom: 25px;
border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.rules-section:last-child {
border-bottom: none;
margin-bottom: 0;
}
.rules-section h2 {
color: #f4a460;
font-size: 1.4rem;
margin-bottom: 15px;
padding-bottom: 8px;
border-bottom: 2px solid rgba(244, 164, 96, 0.3);
}
.rules-section h3 {
color: #e8d8c8;
font-size: 1.1rem;
margin: 20px 0 10px 0;
}
.rules-section h4 {
color: #d4c4b4;
font-size: 1rem;
margin: 15px 0 8px 0;
}
.rules-section p {
line-height: 1.7;
margin-bottom: 12px;
color: rgba(255, 255, 255, 0.9);
}
.rules-section ul {
margin-left: 20px;
margin-bottom: 15px;
}
.rules-section li {
line-height: 1.7;
margin-bottom: 8px;
color: rgba(255, 255, 255, 0.85);
}
/* Rules table */
.rules-table {
width: 100%;
border-collapse: collapse;
margin: 15px 0;
background: rgba(0, 0, 0, 0.2);
border-radius: 8px;
overflow: hidden;
}
.rules-table th,
.rules-table td {
padding: 12px 15px;
text-align: left;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.rules-table th {
background: rgba(244, 164, 96, 0.2);
color: #f4a460;
font-weight: 600;
}
.rules-table tr:last-child td {
border-bottom: none;
}
.value-negative {
color: #4ade80;
font-weight: 700;
}
.value-low {
color: #86efac;
}
.value-zero {
color: #fbbf24;
}
.value-high {
color: #f87171;
font-weight: 600;
}
/* Rules example box */
.rules-example {
background: rgba(0, 0, 0, 0.3);
border: 1px solid rgba(255, 255, 255, 0.15);
border-radius: 8px;
padding: 15px 20px;
margin: 15px 0;
}
.rules-example h4 {
margin-top: 0;
color: #f4a460;
}
.rules-example pre {
font-family: 'Courier New', monospace;
font-size: 0.9rem;
line-height: 1.5;
color: rgba(255, 255, 255, 0.9);
white-space: pre-wrap;
margin: 0;
}
.rules-warning {
background: rgba(239, 68, 68, 0.15);
border: 1px solid rgba(239, 68, 68, 0.3);
border-radius: 6px;
padding: 12px 15px;
color: #fca5a5;
}
/* Rules case boxes */
.rules-case {
background: rgba(255, 255, 255, 0.05);
border-radius: 8px;
padding: 15px;
margin: 15px 0;
border-left: 3px solid rgba(244, 164, 96, 0.5);
}
.rules-case h4 {
margin-top: 0;
}
/* Flip mode boxes */
.rules-mode {
background: rgba(0, 0, 0, 0.2);
border-radius: 10px;
padding: 20px;
margin: 20px 0;
border: 1px solid rgba(255, 255, 255, 0.1);
}
.rules-mode h3 {
margin-top: 0;
color: #f4a460;
}
.mode-summary {
background: rgba(244, 164, 96, 0.15);
border-radius: 6px;
padding: 10px 15px;
font-weight: 600;
color: #f4a460;
margin-bottom: 15px;
}
/* FAQ items */
.faq-item {
background: rgba(0, 0, 0, 0.2);
border-radius: 8px;
padding: 15px 20px;
margin: 15px 0;
border-left: 3px solid #3b82f6;
}
.faq-item h4 {
margin: 0 0 10px 0;
color: #93c5fd;
}
.faq-item p {
margin: 0;
color: rgba(255, 255, 255, 0.85);
}
/* Rules button in lobby */
.btn-rules {
background: rgba(244, 164, 96, 0.2);
border: 1px solid #f4a460;
color: #ffb366;
cursor: pointer;
font-size: 0.65rem;
padding: 2px 8px;
margin-left: 8px;
vertical-align: middle;
border-radius: 3px;
font-weight: 600;
transition: background 0.2s, border-color 0.2s;
}
.btn-rules:hover {
background: rgba(244, 164, 96, 0.35);
border-color: #ffb366;
color: #ffc880;
}
/* Select option styling in advanced options */
.select-option {
margin-bottom: 12px;
}
.select-option label {
display: block;
margin-bottom: 5px;
color: #f4a460;
font-size: 0.9rem;
}
.select-option select {
width: 100%;
padding: 8px 10px;
background: rgba(0, 0, 0, 0.3);
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 6px;
color: white;
font-size: 0.85rem;
}
.select-option .rule-desc {
display: block;
margin-top: 4px;
font-size: 0.75rem;
color: rgba(255, 255, 255, 0.5);
}
/* Mobile adjustments for rules */
@media (max-width: 600px) {
.rules-container {
padding: 20px;
}
.rules-container h1 {
font-size: 1.6rem;
}
.rules-section h2 {
font-size: 1.2rem;
}
.rules-table th,
.rules-table td {
padding: 8px 10px;
font-size: 0.9rem;
}
.rules-example pre {
font-size: 0.8rem;
}
}