/* ==========================================================================
   SOLITAIRE BARON — Master Stylesheet
   Pure CSS playing cards, 4 themes, animations, responsive layouts
   ========================================================================== */

/* --- CSS Custom Properties (Theme: Classic Green) --- */
/* Scoped to .sol-game to avoid bleeding into global Puzzle Baron template */
.sol-game {
    /* Felt / background */
    --felt-color: #1a6b3c;
    --felt-gradient: radial-gradient(ellipse at 50% 30%, #228b4f 0%, #1a6b3c 50%, #135e30 100%);
    --felt-texture: repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px);

    /* Card dimensions */
    --card-w: 92px;
    --card-h: 129px;
    --card-radius: 7px;
    --card-fan-offset: 25px;    /* face-up stacking offset */
    --card-hide-offset: 7px;    /* face-down stacking offset */
    --card-shadow: 0 1px 3px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.08);
    --card-shadow-hover: 0 4px 12px rgba(0,0,0,0.35), 0 0 0 1px rgba(0,0,0,0.12);
    --card-shadow-selected: 0 0 0 3px #ffc107, 0 4px 16px rgba(255,193,7,0.4);
    --card-shadow-hint: 0 0 0 3px #ff6b35, 0 0 20px rgba(255,107,53,0.5);

    /* Card face */
    --card-face-bg: #fff;
    --card-face-border: #c8c8c8;
    --card-red: #c41e3a;
    --card-black: #1a1a2e;

    /* Card back */
    --card-back-primary: #1a3a6b;
    --card-back-secondary: #2456a0;
    --card-back-accent: #ffc107;
    --card-back-pattern: repeating-conic-gradient(var(--card-back-primary) 0% 25%, var(--card-back-secondary) 0% 50%) 50% / 12px 12px;

    /* UI elements */
    --ui-bg: rgba(0,0,0,0.45);
    --ui-text: #fff;
    --ui-accent: #ffc107;
    --ui-button-bg: rgba(255,255,255,0.15);
    --ui-button-hover: rgba(255,255,255,0.25);
    --ui-success: #28a745;
    --ui-danger: #dc3545;
    --ui-warning: #ffc107;

    /* Status bar */
    --status-bg: rgba(0,0,0,0.5);
    --status-text: #e0e0e0;

    /* Empty pile */
    --empty-pile-bg: rgba(255,255,255,0.08);
    --empty-pile-border: rgba(255,255,255,0.2);

    /* Transitions */
    --move-speed: 0.3s;
    --flip-speed: 0.35s;
    --deal-speed: 0.15s;
}

/* --- Theme: Midnight Blue --- */
.theme-midnight {
    --felt-color: #0f1b3d;
    --felt-gradient: radial-gradient(ellipse at 50% 30%, #1a2d5e 0%, #0f1b3d 50%, #0a1229 100%);
    --felt-texture: repeating-linear-gradient(135deg, transparent, transparent 2px, rgba(255,255,255,0.02) 2px, rgba(255,255,255,0.02) 4px);
    --card-back-primary: #4a0e4e;
    --card-back-secondary: #6b2175;
    --card-back-accent: #e040fb;
}

/* --- Theme: Royal Purple --- */
.theme-royal {
    --felt-color: #2d1b4e;
    --felt-gradient: radial-gradient(ellipse at 50% 30%, #3d2866 0%, #2d1b4e 50%, #1f1236 100%);
    --felt-texture: repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255,215,0,0.02) 2px, rgba(255,215,0,0.02) 4px);
    --card-back-primary: #6b1d1d;
    --card-back-secondary: #8b2f2f;
    --card-back-accent: #ffd700;
    --ui-accent: #ffd700;
}

/* --- Theme: Wooden Table --- */
.theme-wood {
    --felt-color: #5c3d2e;
    --felt-gradient: radial-gradient(ellipse at 50% 40%, #7a5240 0%, #5c3d2e 50%, #3e2a1f 100%);
    --felt-texture: repeating-linear-gradient(90deg, transparent, transparent 4px, rgba(0,0,0,0.04) 4px, rgba(0,0,0,0.04) 8px);
    --card-face-bg: #fffef5;
    --card-face-border: #d4c9a8;
    --card-back-primary: #2e5a1e;
    --card-back-secondary: #3d7a28;
    --card-back-accent: #c8a84e;
    --ui-accent: #c8a84e;
}

/* ==========================================================================
   GAME CONTAINER
   ========================================================================== */
.sol-game {
    background: var(--felt-gradient);
    position: relative;
    min-height: 520px;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}
.sol-game::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--felt-texture);
    pointer-events: none;
    z-index: 0;
}

/* ==========================================================================
   STATUS BAR
   ========================================================================== */
.sol-status {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: var(--status-bg);
    color: var(--status-text);
    font-size: 13px;
    gap: 12px;
    flex-wrap: wrap;
}
.sol-status-group {
    display: flex;
    align-items: center;
    gap: 16px;
}
.sol-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}
.sol-stat-label {
    opacity: 0.7;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sol-stat-value {
    font-weight: bold;
    font-family: 'Courier New', monospace;
    font-size: 15px;
    color: #fff;
    min-width: 40px;
}
.sol-stat-value.score-value {
    color: var(--ui-accent);
}
.sol-streak {
    display: flex;
    gap: 3px;
    align-items: center;
}
.sol-streak-pip {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transition: all 0.2s;
}
.sol-streak-pip.active {
    background: var(--ui-accent);
    box-shadow: 0 0 6px var(--ui-accent);
}

/* ==========================================================================
   PLAYING FIELD
   ========================================================================== */
.sol-field {
    position: relative;
    z-index: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 480px;
}

/* Top row (stock/waste/foundations or freecells/foundations)
   Spreads items to align with tableau columns below */
.sol-top-row {
    display: flex;
    align-items: flex-start;
    min-height: calc(var(--card-h) + 4px);
    width: 100%;
}
.sol-top-left {
    display: flex;
    gap: 8px;
}
.sol-top-spacer {
    flex: 1;
    min-width: 8px;
}
.sol-top-right {
    display: flex;
    gap: 8px;
}

/* FreeCell / Spider: top row should also spread full width */
.game-freecell .sol-top-row,
.game-spider .sol-top-row {
    justify-content: space-between;
}

/* Tableau — columns spread to fill full available width.
 * gap: 8px guarantees a minimum 8-pixel breathing space between columns,
 * even when the container is wide enough that .sol-column would otherwise
 * stretch them edge-to-edge. */
.sol-tableau {
    display: flex;
    align-items: flex-start;
    flex: 1;
    width: 100%;
    gap: 8px;
}

/* ==========================================================================
   CARD PILE (generic container)
   ========================================================================== */
.sol-pile {
    position: relative;
    width: var(--card-w);
    min-height: var(--card-h);
    flex-shrink: 0;
}
/* Top-row piles inside left/right groups stay fixed-width */
.sol-top-left .sol-pile,
.sol-top-right .sol-pile {
    flex-shrink: 0;
}

/* Empty pile slot.
 * box-sizing: border-box keeps the 2px dashed border INSIDE the card-w
 * footprint — without it, the slot is rendered at card-w + 4px and the
 * rightmost top-row pile gets visually clipped at the container edge. */
.sol-pile-slot {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--card-w);
    height: var(--card-h);
    box-sizing: border-box;
    border-radius: var(--card-radius);
    background: var(--empty-pile-bg);
    border: 2px dashed var(--empty-pile-border);
    display: flex;
    align-items: center;
    justify-content: center;
}
.sol-pile-slot .pile-label {
    font-size: 22px;
    opacity: 0.3;
    color: #fff;
}

/* Foundation pile label (suit symbol) */
.sol-pile-slot.foundation-slot .pile-label {
    font-size: 28px;
    opacity: 0.25;
}

/* Stock pile: clickable */
.sol-pile.stock-pile { cursor: pointer; }
.sol-pile.stock-pile .sol-pile-slot {
    border-style: solid;
    border-color: rgba(255,255,255,0.3);
    cursor: pointer;
}
.sol-pile.stock-pile .sol-pile-slot::after {
    content: '↻';
    font-size: 28px;
    color: rgba(255,255,255,0.4);
}
.sol-pile.stock-pile.has-cards .sol-pile-slot::after {
    content: none;
}

/* ==========================================================================
   TABLEAU COLUMN
   ========================================================================== */
/* Columns expand equally to fill tableau width.
   A .col-stack wrapper inside each column handles centering via margin:auto. */
.sol-column {
    position: relative;
    min-width: var(--card-w);
    min-height: calc(var(--card-h) + 60px);
    flex: 1 1 0%;
}
/* The card stack wrapper sits centered inside the wider column */
.col-stack {
    position: relative;
    width: var(--card-w);
    margin: 0 auto;
}
/* Empty pile slot also centers via the wrapper */
.sol-column .sol-pile-slot {
    left: 0;
}

/* ==========================================================================
   PLAYING CARD
   ========================================================================== */
.card {
    position: absolute;
    width: var(--card-w);
    height: var(--card-h);
    border-radius: var(--card-radius);
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.15s;
    box-shadow: var(--card-shadow);
    z-index: 1;
    perspective: 600px;
}
.card.no-transition {
    transition: none !important;
}

/* Card inner (for flip animation) */
.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform var(--flip-speed) ease-in-out;
    transform-style: preserve-3d;
}
.card.face-down .card-inner {
    transform: rotateY(180deg);
}

/* Card front */
.card-front {
    position: absolute;
    inset: 0;
    background: var(--card-face-bg);
    border-radius: var(--card-radius);
    backface-visibility: hidden;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
/* SVG card image (classic/modern designs) fills entire card face */
.card-svg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    border-radius: var(--card-radius);
}
/* Face cards (J/Q/K) in the modern SVG pack have their corner indicators
   baked slightly further left/up than number cards. Nudge face-card art
   3px right+down so the indicators line up with Ace/number cards. */
.card[data-rank="K"] .card-svg-img {
    inset: 4px 0 0 4px;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
}
.card[data-rank="J"] .card-svg-img,
.card[data-rank="Q"] .card-svg-img {
    inset: 4px 0 0 3px;
    width: calc(100% - 3px);
    height: calc(100% - 4px);
}
.card-back-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--card-radius) - 3px);
}

/* Card back */
.card-back {
    position: absolute;
    inset: 0;
    border-radius: var(--card-radius);
    backface-visibility: hidden;
    transform: rotateY(180deg);
    background: var(--card-back-pattern);
    border: 3px solid var(--card-back-primary);
    overflow: hidden;
}
.card-back::before {
    content: '';
    position: absolute;
    inset: 3px;
    border: 1px solid var(--card-back-accent);
    border-radius: 2px;
}
.card-back::after {
    content: '♠';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: var(--card-back-accent);
    opacity: 0.6;
}

/* Card states — base (non-column cards) */
.card:hover:not(.face-down):not(.dragging) {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-4px) scale(1.05);
    z-index: 50;
}
.card.selected {
    box-shadow: var(--card-shadow-selected);
    transform: translateY(-4px);
    z-index: 100;
}
.card.hint-highlight {
    box-shadow: var(--card-shadow-hint);
    animation: hintPulse 0.8s ease-in-out infinite alternate;
}
.card.dragging {
    z-index: 10000 !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.45);
    cursor: grabbing;
    transition: box-shadow 0.1s;
    opacity: 0.92;
}
.card.invalid-target {
    animation: cardShake 0.35s ease-in-out;
}

/* Column cards inherit standard hover/selected/invalid from .card rules above */
.card.fly-to-foundation {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 9999;
}

/* --- Corner Labels (large, high-contrast for visibility) --- */
.card-corner {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    font-weight: bold;
    pointer-events: none;
}
.card-corner.top-left {
    top: 3px;
    left: 4px;
}
.card-corner.bottom-right {
    bottom: 3px;
    right: 4px;
    transform: rotate(180deg);
}
.card-rank {
    font-size: 15px;
    font-family: Georgia, serif;
    letter-spacing: -0.5px;
}
.card-suit-icon {
    line-height: 1;
    margin-top: -1px;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* SVG suit icons in corners */
.card-suit-icon .suit-svg {
    width: 14px;
    height: 14px;
}
/* SVG suits inherit color from the card color class */
.suit-svg {
    display: inline-block;
    vertical-align: middle;
}

/* Color classes */
.card[data-color="red"] .card-corner,
.card[data-color="red"] .pip {
    color: var(--card-red);
}
.card[data-color="black"] .card-corner,
.card[data-color="black"] .pip {
    color: var(--card-black);
}

/* ==========================================================================
   PIP GRID (center of card)
   ========================================================================== */
.card-center {
    flex: 1;
    position: relative;
    margin: 4px 16px 4px 16px; /* wider side margins to clear corner labels */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.pip-grid {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: repeat(5, 1fr);
    align-items: center;
    justify-items: center;
}
.pip {
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pip .suit-svg {
    width: 16px;
    height: 16px;
}
.pip.inverted {
    transform: rotate(180deg);
}

/* Ace: single large SVG suit */
.card[data-rank="A"] .card-center .ace-pip {
    display: flex;
    align-items: center;
    justify-content: center;
}
.ace-pip .suit-svg {
    width: 44px;
    height: 44px;
}

/* Face cards: stylized design */
.face-design {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}
.face-letter {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 34px;
    font-weight: bold;
    line-height: 1;
}
.face-crown {
    font-size: 16px;
    opacity: 0.7;
}
.face-suit .suit-svg {
    width: 20px;
    height: 20px;
}
/* J, Q, K get unique accents */
.card[data-rank="J"] .face-letter { font-style: italic; }
.card[data-rank="Q"] .face-letter { font-variant: small-caps; }
.card[data-rank="K"] .face-crown::after { content: '♛'; }
.card[data-rank="Q"] .face-crown::after { content: '♕'; }
.card[data-rank="J"] .face-crown::after { content: '⚔'; }

/* ==========================================================================
   TOOLBAR
   ========================================================================== */
.sol-toolbar {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--status-bg);
    flex-wrap: wrap;
}
.sol-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: var(--ui-button-bg);
    color: var(--ui-text);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.sol-btn:hover {
    background: var(--ui-button-hover);
    border-color: rgba(255,255,255,0.3);
}
.sol-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.sol-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.sol-btn.btn-primary {
    background: rgba(40,167,69,0.3);
    border-color: rgba(40,167,69,0.5);
}
.sol-btn.btn-primary:hover {
    background: rgba(40,167,69,0.5);
}
.sol-btn-divider {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,0.15);
    margin: 0 4px;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.sol-toast-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.sol-toast {
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    color: #fff;
    opacity: 0;
    animation: toastPop 1.2s ease-out forwards;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.sol-toast.bonus {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    font-size: 16px;
}
.sol-toast.penalty {
    background: linear-gradient(135deg, #dc3545, #c82333);
}
.sol-toast.info {
    background: linear-gradient(135deg, #17a2b8, #138496);
}
.sol-toast.streak {
    background: linear-gradient(135deg, #ff6b35, #e83e8c);
    font-size: 18px;
}

/* ==========================================================================
   WIN MODAL
   ========================================================================== */
.sol-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    backdrop-filter: blur(4px);
}
.sol-modal-overlay.active {
    display: flex;
}
.sol-modal {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 460px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: modalSlideIn 0.4s ease-out;
    color: #333;
}
.sol-modal h2 {
    font-family: Georgia, serif;
    font-size: 28px;
    margin-bottom: 16px;
    color: #1a6b3c;
}
.sol-modal .score-breakdown {
    text-align: left;
    margin: 16px 0;
    padding: 16px;
    background: #f8f8f8;
    border-radius: 8px;
}
.sol-modal .score-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 14px;
}
.sol-modal .score-row.total {
    border-top: 2px solid #ddd;
    margin-top: 8px;
    padding-top: 8px;
    font-weight: bold;
    font-size: 16px;
    color: #1a6b3c;
}
.sol-modal .score-row .bonus-label {
    color: #28a745;
}
.sol-modal .score-row .penalty-label {
    color: #dc3545;
}
.sol-modal .badges {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 12px 0;
}
.sol-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #333;
}
.sol-modal .modal-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 20px;
}
.sol-modal .modal-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s;
}
.sol-modal .modal-btn.primary {
    background: linear-gradient(135deg, #28a745, #218838);
    color: #fff;
}
.sol-modal .modal-btn.primary:hover {
    background: linear-gradient(135deg, #34ce57, #28a745);
}
.sol-modal .modal-btn.secondary {
    background: #e9ecef;
    color: #333;
}
.sol-modal .modal-btn.secondary:hover {
    background: #dee2e6;
}

/* ==========================================================================
   CONFETTI CELEBRATION
   ========================================================================== */
.confetti-container {
    position: fixed;
    inset: 0;
    z-index: 99999;
    pointer-events: none;
    overflow: hidden;
}
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -20px;
    opacity: 0;
    animation: confettiFall linear forwards;
}
.confetti.square { border-radius: 0; }
.confetti.circle { border-radius: 50%; }
.confetti.strip { width: 4px; height: 14px; border-radius: 2px; }

/* Cascading cards (Windows Solitaire tribute) */
.cascade-card {
    position: fixed;
    z-index: 99998;
    pointer-events: none;
}

/* ==========================================================================
   AUTO-COMPLETE BUTTON
   ========================================================================== */
.sol-autocomplete-bar {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    animation: slideUp 0.4s ease-out;
}
.sol-autocomplete-btn {
    padding: 10px 28px;
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #333;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255,193,7,0.4);
    transition: all 0.2s;
}
.sol-autocomplete-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255,193,7,0.5);
}

/* ==========================================================================
   GAME-SPECIFIC: KLONDIKE
   ========================================================================== */
.game-klondike .sol-top-left {
    gap: 8px;
}
.game-klondike .waste-pile .card {
    /* Waste shows top 1-3 cards fanned slightly */
}
.game-klondike .waste-fan {
    position: relative;
    width: calc(var(--card-w) + 40px);
    height: var(--card-h);
}

/* ==========================================================================
   GAME-SPECIFIC: FREECELL
   ========================================================================== */
.game-freecell .sol-top-left {
    gap: 6px;
}
.game-freecell .sol-top-right {
    gap: 6px;
}
.game-freecell .freecell-slot {
    background: rgba(255,255,255,0.06);
    border: 2px solid rgba(255,255,255,0.25);
}
.game-freecell .freecell-slot .pile-label {
    font-size: 16px;
    letter-spacing: 1px;
}

/* ==========================================================================
   GAME-SPECIFIC: SPIDER
   ========================================================================== */
.game-spider .sol-top-row {
    justify-content: space-between;
}
.game-spider .stock-indicator {
    display: flex;
    gap: 3px;
    align-items: center;
}
.game-spider .stock-dot {
    width: 14px;
    height: 20px;
    border-radius: 3px;
    background: var(--card-back-primary);
    border: 1px solid var(--card-back-accent);
    opacity: 0.7;
    transition: opacity 0.3s;
}
.game-spider .stock-dot.used {
    opacity: 0.15;
}
.game-spider .completed-indicator {
    display: flex;
    gap: 3px;
    align-items: center;
}
.game-spider .completed-marker {
    width: 14px;
    height: 20px;
    border-radius: 3px;
    background: var(--ui-success);
    border: 1px solid rgba(255,255,255,0.3);
    opacity: 0.25;
    transition: all 0.4s;
}
.game-spider .completed-marker.done {
    opacity: 1;
    box-shadow: 0 0 8px var(--ui-success);
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes hintPulse {
    0% { box-shadow: 0 0 0 3px #ff6b35, 0 0 10px rgba(255,107,53,0.3); }
    100% { box-shadow: 0 0 0 3px #ff6b35, 0 0 25px rgba(255,107,53,0.6); }
}

@keyframes cardShake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-6px); }
    30% { transform: translateX(5px); }
    45% { transform: translateX(-4px); }
    60% { transform: translateX(3px); }
    75% { transform: translateX(-2px); }
}

@keyframes cardShakeCentered {
    0%, 100% { transform: translateX(-50%); }
    15% { transform: translateX(calc(-50% - 6px)); }
    30% { transform: translateX(calc(-50% + 5px)); }
    45% { transform: translateX(calc(-50% - 4px)); }
    60% { transform: translateX(calc(-50% + 3px)); }
    75% { transform: translateX(calc(-50% - 2px)); }
}

@keyframes toastPop {
    0% { opacity: 0; transform: scale(0.5) translateY(20px); }
    15% { opacity: 1; transform: scale(1.1) translateY(-5px); }
    25% { transform: scale(1) translateY(0); }
    75% { opacity: 1; transform: scale(1) translateY(0); }
    100% { opacity: 0; transform: scale(0.9) translateY(-30px); }
}

@keyframes modalSlideIn {
    0% { opacity: 0; transform: scale(0.85) translateY(30px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes slideUp {
    0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes confettiFall {
    0% { opacity: 1; top: -5%; }
    100% { opacity: 0; top: 105%; }
}

@keyframes dealFly {
    0% { opacity: 0; }
    10% { opacity: 1; }
    100% { opacity: 1; }
}

@keyframes scoreRollUp {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes foundationFlash {
    0% { box-shadow: 0 0 0 0 var(--ui-success); }
    50% { box-shadow: 0 0 20px 5px var(--ui-success); }
    100% { box-shadow: 0 0 0 0 var(--ui-success); }
}

@keyframes cascadeBounce {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 760px) {
    .sol-game {
        --card-w: 52px;
        --card-h: 73px;
        --card-fan-offset: 16px;
        --card-hide-offset: 4px;
        --card-radius: 4px;
    }
    .card-rank { font-size: 11px; }
    .card-suit-icon .suit-svg { width: 10px; height: 10px; }
    .pip .suit-svg { width: 12px; height: 12px; }
    .ace-pip .suit-svg { width: 28px; height: 28px; }
    .face-letter { font-size: 20px; }
    .face-crown { font-size: 10px; }
    .face-suit .suit-svg { width: 14px; height: 14px; }
    .card-center { margin: 2px 8px; }
    .sol-field { padding: 6px; gap: 8px; }
    .sol-status { font-size: 11px; padding: 6px 10px; gap: 8px; }
    .sol-stat-value { font-size: 13px; }
    .sol-toolbar { gap: 4px; padding: 6px 10px; }
    .sol-btn { padding: 5px 10px; font-size: 11px; }
    .sol-btn .btn-text { display: none; }
}

@media (max-width: 480px) {
    .sol-game {
        --card-w: 40px;
        --card-h: 56px;
        --card-fan-offset: 13px;
        --card-hide-offset: 3px;
    }
    .card-rank { font-size: 8px; }
    .card-suit-icon { font-size: 7px; }
    .pip { font-size: 8px; }
    .card[data-rank="A"] .card-center .ace-pip { font-size: 20px; }
    .face-letter { font-size: 16px; }
    .face-crown { font-size: 8px; }
    .card-corner.top-left { top: 2px; left: 3px; }
    .card-corner.bottom-right { bottom: 2px; right: 3px; }
    .sol-status-group { gap: 8px; }
    .sol-stat-label { display: none; }
}

/* ==========================================================================
   UTILITY
   ========================================================================== */
.sol-hidden { display: none !important; }
.sol-clickable { cursor: pointer; }
.sol-noselect { user-select: none; -webkit-user-select: none; }
