.iframe_fs_back{z-index:1999;}
.iframeoverlay{z-index:2000;}
.contentLoader{z-index:2001;}
.gameStrip_in{z-index:2002;}

@font-face {
font-family: 'Outfit';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/outfit/v15/QGYyz_MVcBeNP4NjuGObqx1XmO1I4TC1C4E.ttf) format('truetype');
}
@font-face {
font-family: 'Outfit';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url(https://fonts.gstatic.com/s/outfit/v15/QGYyz_MVcBeNP4NjuGObqx1XmO1I4e6yC4E.ttf) format('truetype');
}
@font-face {
font-family: 'Outfit';
font-style: normal;
font-weight: 800;
font-display: swap;
src: url(https://fonts.gstatic.com/s/outfit/v15/QGYyz_MVcBeNP4NjuGObqx1XmO1I4bCyC4E.ttf) format('truetype');
}


:root {
--bg-color: #0b2b13;
--felt-color: #165626;
--card-white: #ffffff;
--card-red: #e74c3c;
--card-black: #2c3e50;
--card-back: #1e3a29;
--card-back-pattern: repeating-linear-gradient(45deg, #1e3a29, #1e3a29 5px, #162a1e 5px, #162a1e 10px);

--shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.3);
--shadow-md: 0 8px 15px rgba(0, 0, 0, 0.4);
--shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.6);

--card-width: 90px;
--card-height: 130px;

--card-radius: 8px;
--gap: 15px;

--primary-color: #f1c40f;
--primary-hover: #f39c12;
}

@media (max-width: 950px) {
:root {
--card-width: 80px;
--card-height: 100px;
--gap: 13px;
}
}

@media (max-width: 700px),
(max-aspect-ratio: 4/5) {
:root {
--card-width: 13vw;
--card-height: 18vw;
--gap: 1vw;
}

.gmTopHdr {
flex-direction: column;
gap: 10px;
padding: 10px;
}

.stats {
width: 100%;
justify-content: space-around;
gap: 10px;
}

.stat .value {
font-size: 1.2rem;
}

.btn-primary {
padding: 8px 16px;
font-size: 0.9rem;
}

#game-board {
padding: 5px;
}

.top-row {
margin-bottom: 15px;
}

.card .value {
font-size: 1.1rem;
}

.card .suit-small {
font-size: 1rem;
}

/* Center large suit better on small screens */
.card .suit-large {
font-size: 2.5rem;
bottom: 4px;
right: 4px;
}
}

.puraGame * {
box-sizing: border-box;
user-select: none;
-webkit-tap-highlight-color: transparent;
margin: 0;
padding: 0;
}

.puraGame {
position:relative;
background-color: var(--bg-color);
background-image: radial-gradient(circle at center, var(--felt-color) 0%, var(--bg-color) 100%);
font-family: 'Outfit', system-ui, -apple-system, sans-serif;
height: 100%;
overflow: hidden;
color: #fff;
display: flex;
flex-direction: column;
}
.puraGame,.puraGame *{transition:none;-webkit-transition:none;-moz-transition:none;-o-transition:none}

.gmTopHdr {
background: rgba(255, 255, 255, 0.05);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px 30px;
z-index: 100;
}

.stats {
display: flex;
gap: 30px;
}

.stat {
display: flex;
flex-direction: column;
align-items: center;
}

.stat .label {
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 1px;
opacity: 0.7;
margin-bottom: 2px;
}

.stat .value {
font-size: 1.5rem;
font-weight: 800;
color: var(--primary-color);
font-variant-numeric: tabular-nums;
}

.btn-primary {
background: var(--primary-color);
color: #000;
border: none;
padding: 10px 24px;
border-radius: 30px;
font-size: 1rem;
font-weight: 800;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
box-shadow: 0 4px 15px rgba(241, 196, 15, 0.3);
}

.btn-primary:hover {
background: var(--primary-hover);
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(241, 196, 15, 0.4);
}

.btn-primary:active {
transform: translateY(1px);
}

.btn-primary.large {
font-size: 1.25rem;
padding: 15px 40px;
}

/* Game Board */
#game-board {
flex: 1;
position: relative;
padding: 30px;
max-width: 1200px;
margin: 0 auto;
width: 100%;
touch-action: none;
/* Keep a context for absolute cards */
}

/* Pile Slots (Empty spaces) */
.top-row {
display: flex;
justify-content: space-between;
margin-bottom: 30px;
}

.stock-waste,
.foundations {
display: flex;
gap: var(--gap);
}

.pile {
width: var(--card-width);
height: var(--card-height);
border-radius: var(--card-radius);
background: rgba(0, 0, 0, 0.2);
border: 2px dashed rgba(255, 255, 255, 0.15);
position: relative;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.2s, border-color 0.2s;
flex-shrink: 0;
}

.pile.highlight-target {
background: rgba(241, 196, 15, 0.2);
border-color: rgba(241, 196, 15, 0.6);
}

.slot-hint {
font-size: 2rem;
opacity: 0.15;
font-weight: 800;
}

.slot-hint.red {
color: #fff;
opacity: 0.2;
}

.slot-hint.black {
color: #000;
opacity: 0.3;
}

.stock-pile .slot-hint {
font-size: 2.5rem;
display: none;
margin-top: -5px;
}

.stock-pile.empty .slot-hint {
display: block;
color: #fff;
cursor: pointer;
transition: color 0.2s;
}

.stock-pile.empty:hover .slot-hint {
color: var(--primary-color);
opacity: 0.5;
}

.tableau {
display: flex;
gap: var(--gap);
justify-content: center;
}


.waste-pile {
border: none;
background: transparent;
}

/* Cards */
.card {
width: var(--card-width);
height: var(--card-height);
background: var(--card-white);
border-radius: var(--card-radius);
position: absolute;
box-shadow: var(--shadow-sm);
cursor: pointer;
display: flex;
flex-direction: column;
padding: 8px;
border: 1px solid rgba(0, 0, 0, 0.1);
transform-origin: center center;
/* transition is applied dynamically via JS to avoid init jumps, but generally: */
transition: left 0.15s ease-out, top 0.15s ease-out, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s;
z-index: 10;
transform-style: preserve-3d;
}

.card .front {
position: absolute;
inset: 0;
padding: 8px;
border-radius: var(--card-radius);
background: var(--card-white);
backface-visibility: hidden;
display: flex;
flex-direction: column;
/* Slight inner glow */
box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.5);
}

.card .back {
position: absolute;
inset: 0;
border-radius: var(--card-radius);
background: var(--card-back-pattern);
border: 4px solid #fff;
backface-visibility: hidden;
transform: rotateY(180deg);
}

/* Colors */
.card.red .front {
color: var(--card-red);
}

.card.black .front {
color: var(--card-black);
}

/* Typography inside card */
.card .value {
font-size: 1.4rem;
font-weight: 800;
line-height: 1;
}

.card .suit-small {
font-size: 1.2rem;
line-height: 1;
margin-top: 2px;
}

.card .suit-large {
position: absolute;
bottom: 8px;
right: 8px;
font-size: 3.5rem;
opacity: 0.15;
line-height: 0.8;
}

/* State classes */
.card.face-down {
transform: rotateY(180deg);
}

.card.dragging {
pointer-events: none !important;
transition: none !important;
/* Fast follow cursor */
box-shadow: var(--shadow-lg);
transform: scale(1.05);
}

/* Modals */
.modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.85);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 10000;
color: white;
text-align: center;
opacity: 1;
transition: opacity 0.3s;
}

.modal.hidden {
opacity: 0;
pointer-events: none;
}

.modal-content {
background: rgba(255, 255, 255, 0.1);
border: 2px solid rgba(255, 255, 255, 0.2);
padding: 50px;
border-radius: 20px;
box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
transform: scale(1);
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hint-highlight {
box-shadow: 0 0 20px 8px rgba(255, 215, 0, 0.8) !important;
animation: pulseHint 1s infinite alternate;
z-index: 9999 !important;
}

@keyframes pulseHint {
0% { transform: scale(1); }
100% { transform: scale(1.05); }
}

.actions {
display: flex;
gap: 10px;
}

.btn-secondary {
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2);
color: white;
padding: 8px 16px;
border-radius: 20px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s;
backdrop-filter: blur(10px);
}

.btn-secondary:hover:not(:disabled) {
background: rgba(255, 255, 255, 0.2);
transform: translateY(-2px);
}

.btn-secondary:disabled {
opacity: 0.5;
cursor: not-allowed;
}

.modal.hidden .modal-content {
transform: scale(0.8);
}

.glossy-text {
font-size: 4rem;
background: linear-gradient(to bottom, #f1c40f, #f39c12);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
margin-bottom: 20px;
text-shadow: 0 4px 20px rgba(241, 196, 15, 0.3);
}

.final-stats {
font-size: 1.5rem;
margin-bottom: 30px;
opacity: 0.9;
}

/* Confetti particles */
.confetti {
position: fixed;
top: -10px;
width: 10px;
height: 10px;
background-color: #f1c40f;
z-index: 9999;
animation: fall linear forwards;
}

@keyframes fall {
to {
transform: translateY(100vh) rotate(720deg);
}
}
/* Mobile Performance Fixes */
.puraGame {
touch-action: none !important;
user-select: none !important;
-webkit-user-select: none !important;
overscroll-behavior: none !important;
}
* {
-webkit-tap-highlight-color: transparent !important;
}
canvas, .game-container {
transform: translateZ(0);
}