.neon-game {
    max-width: 680px;
    margin: 0 auto;
    padding: 36px 32px 40px;
    border-radius: 28px;
    border: 2px solid transparent;
    background:
        linear-gradient(160deg, #0a0118 0%, #150528 35%, #0c1428 100%) padding-box,
        linear-gradient(135deg, #00e5ff, #7c4dff, #ff6b9d, #00e5ff) border-box;
    box-shadow:
        0 0 80px rgba(124, 77, 255, 0.35),
        0 24px 60px rgba(0, 0, 0, 0.55),
        inset 0 0 100px rgba(0, 229, 255, 0.04);
    position: relative;
    overflow: hidden;
    animation: neon-cabinet-pulse 4s ease-in-out infinite;
}

@keyframes neon-cabinet-pulse {
    0%, 100% { box-shadow: 0 0 80px rgba(124, 77, 255, 0.35), 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 0 100px rgba(0, 229, 255, 0.04); }
    50% { box-shadow: 0 0 100px rgba(0, 229, 255, 0.4), 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 0 120px rgba(124, 77, 255, 0.08); }
}

.neon-game::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 229, 255, 0.18) 0%, transparent 55%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 229, 255, 0.02) 2px, rgba(0, 229, 255, 0.02) 4px);
    pointer-events: none;
    animation: neon-scan 8s linear infinite;
}

@keyframes neon-scan {
    0% { transform: translateY(0); }
    100% { transform: translateY(20px); }
}

.neon-game::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00e5ff, #ff6b9d, #7c4dff, transparent);
    border-radius: 2px;
    opacity: 0.6;
    animation: neon-topbar 3s ease-in-out infinite;
}

@keyframes neon-topbar {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.9; }
}

.neon-game.win-flash::before {
    animation: neon-win-flash 0.6s ease;
}

@keyframes neon-win-flash {
    0%, 100% { background-color: transparent; }
    30% { background-color: rgba(255, 215, 0, 0.12); }
}

.neon-game-hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    position: relative;
    z-index: 2;
}

.neon-game-stat {
    padding: 12px 20px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(0, 229, 255, 0.35);
    background: rgba(0, 0, 0, 0.55);
    font-family: var(--font-display);
    font-size: 0.88rem;
    backdrop-filter: blur(8px);
    box-shadow: inset 0 0 20px rgba(0, 229, 255, 0.05);
}

.neon-game-stat span {
    color: var(--sky);
    font-weight: 700;
    transition: transform 0.3s ease, color 0.3s ease;
}

.neon-game-stat span.bump {
    animation: stat-bump 0.45s ease;
}

@keyframes stat-bump {
    0% { transform: scale(1); }
    40% { transform: scale(1.35); color: #ffd700; }
    100% { transform: scale(1); }
}

.neon-reels-wrap {
    position: relative;
    z-index: 2;
    margin-bottom: 28px;
    padding: 20px 16px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(124, 77, 255, 0.3);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
}

.neon-payline {
    position: absolute;
    top: 50%;
    left: 8px;
    right: 8px;
    height: 2px;
    transform: translateY(-50%);
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.8), transparent);
    opacity: 0;
    z-index: 5;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.neon-payline.active {
    opacity: 1;
    animation: payline-glow 1s ease-in-out infinite;
}

@keyframes payline-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 215, 0, 0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.9), 0 0 40px rgba(255, 107, 157, 0.4); }
}

.neon-reels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    position: relative;
}

.neon-reel {
    aspect-ratio: 0.72;
    border-radius: 14px;
    border: 2px solid rgba(124, 77, 255, 0.5);
    background: linear-gradient(180deg, #050210 0%, #0a0520 100%);
    overflow: hidden;
    position: relative;
    box-shadow:
        0 0 24px rgba(124, 77, 255, 0.2),
        inset 0 0 30px rgba(0, 0, 0, 0.8);
}

.neon-reel::before,
.neon-reel::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 28%;
    z-index: 3;
    pointer-events: none;
}

.neon-reel::before {
    top: 0;
    background: linear-gradient(180deg, rgba(5, 2, 16, 0.95) 0%, transparent 100%);
}

.neon-reel::after {
    bottom: 0;
    background: linear-gradient(0deg, rgba(5, 2, 16, 0.95) 0%, transparent 100%);
}

.neon-reel-strip {
    display: flex;
    flex-direction: column;
    transition: transform 0.1s linear;
    will-change: transform;
}

.neon-reel.spinning .neon-reel-strip {
    transition: none;
    animation: neon-strip-blur 0.08s linear infinite;
}

@keyframes neon-strip-blur {
    0% { transform: translateY(0); }
    100% { transform: translateY(-80px); }
}

.neon-reel.stopping .neon-reel-strip {
    transition: transform 0.7s cubic-bezier(0.15, 0.85, 0.25, 1);
}

.neon-symbol {
    height: 80px;
    display: grid;
    place-items: center;
    font-size: clamp(2rem, 6vw, 3rem);
    flex-shrink: 0;
    position: relative;
}

.neon-symbol i {
    filter: drop-shadow(0 0 8px currentColor);
    transition: transform 0.4s ease, filter 0.4s ease;
}

.neon-symbol.win i {
    animation: symbol-win 0.8s ease infinite;
}

@keyframes symbol-win {
    0%, 100% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 12px currentColor); }
    50% { transform: scale(1.2) rotate(8deg); filter: drop-shadow(0 0 28px currentColor) drop-shadow(0 0 40px #fff); }
}

.sym-star { color: #ffd700; }
.sym-diamond { color: #00e5ff; }
.sym-bolt { color: #ff6b9d; }
.sym-gem { color: #b388ff; }
.sym-crown { color: #ffb347; }

.neon-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}

.neon-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: particle-burst 0.9s ease-out forwards;
}

@keyframes particle-burst {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--px), var(--py)) scale(0); opacity: 0; }
}

.neon-spin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 18px 36px;
    border: none;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #0a0221;
    background: linear-gradient(135deg, #00e5ff 0%, #7c4dff 45%, #ff6b9d 100%);
    background-size: 200% 200%;
    box-shadow: 0 0 40px rgba(0, 229, 255, 0.45), 0 10px 30px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    position: relative;
    z-index: 2;
    overflow: hidden;
    animation: btn-gradient 4s ease infinite;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@keyframes btn-gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.neon-spin-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.35) 50%, transparent 60%);
    transform: translateX(-100%);
    animation: btn-shine 3s ease-in-out infinite;
}

@keyframes btn-shine {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.neon-spin-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 60px rgba(0, 229, 255, 0.65), 0 14px 36px rgba(0, 0, 0, 0.5);
}

.neon-spin-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.neon-spin-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    animation: none;
}

.neon-spin-btn.spinning i {
    animation: spin-icon 0.6s linear infinite;
}

@keyframes spin-icon {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.neon-message {
    text-align: center;
    margin-top: 20px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    min-height: 28px;
    position: relative;
    z-index: 2;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.neon-message.show {
    animation: message-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes message-pop {
    0% { opacity: 0; transform: scale(0.8) translateY(10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.royal-game {
    max-width: 580px;
    margin: 0 auto;
    padding: 36px 32px 40px;
    border-radius: 28px;
    border: 2px solid rgba(255, 179, 71, 0.3);
    background:
        radial-gradient(ellipse 100% 80% at 50% 100%, rgba(255, 179, 71, 0.08) 0%, transparent 50%),
        linear-gradient(165deg, #1f1240 0%, #120a28 40%, #0a1628 100%);
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.55),
        inset 0 0 80px rgba(255, 179, 71, 0.04);
    position: relative;
    overflow: hidden;
}

.royal-game::before {
    content: '';
    position: absolute;
    inset: 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 179, 71, 0.12);
    pointer-events: none;
}

.royal-game::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.04), transparent);
    animation: royal-shimmer 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes royal-shimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

.royal-game-hud {
    display: flex;
    justify-content: space-between;
    margin-bottom: 28px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--text-dim);
    position: relative;
    z-index: 2;
}

.royal-game-hud strong {
    color: var(--amber);
    font-size: 1.1rem;
}

.royal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    position: relative;
    z-index: 2;
    perspective: 1000px;
}

.royal-card {
    aspect-ratio: 3/4;
    border-radius: 14px;
    cursor: pointer;
    perspective: 800px;
    border: none;
    background: transparent;
    padding: 0;
    opacity: 0;
    transform: translateY(-30px) rotateX(20deg);
    animation: card-deal 0.5s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

.royal-card:nth-child(1) { animation-delay: 0.05s; }
.royal-card:nth-child(2) { animation-delay: 0.1s; }
.royal-card:nth-child(3) { animation-delay: 0.15s; }
.royal-card:nth-child(4) { animation-delay: 0.2s; }
.royal-card:nth-child(5) { animation-delay: 0.25s; }
.royal-card:nth-child(6) { animation-delay: 0.3s; }
.royal-card:nth-child(7) { animation-delay: 0.35s; }
.royal-card:nth-child(8) { animation-delay: 0.4s; }
.royal-card:nth-child(9) { animation-delay: 0.45s; }
.royal-card:nth-child(10) { animation-delay: 0.5s; }
.royal-card:nth-child(11) { animation-delay: 0.55s; }
.royal-card:nth-child(12) { animation-delay: 0.6s; }
.royal-card:nth-child(13) { animation-delay: 0.65s; }
.royal-card:nth-child(14) { animation-delay: 0.7s; }
.royal-card:nth-child(15) { animation-delay: 0.75s; }
.royal-card:nth-child(16) { animation-delay: 0.8s; }

@keyframes card-deal {
    to { opacity: 1; transform: translateY(0) rotateX(0); }
}

.royal-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.royal-card:hover:not(.flipped):not(.matched) .royal-card-inner {
    transform: translateY(-4px) rotateX(5deg);
}

.royal-card.flipped .royal-card-inner,
.royal-card.matched .royal-card-inner {
    transform: rotateY(180deg);
}

.royal-card.matched .royal-card-inner {
    animation: match-pulse 0.6s ease;
}

@keyframes match-pulse {
    0%, 100% { transform: rotateY(180deg) scale(1); }
    50% { transform: rotateY(180deg) scale(1.08); }
}

.royal-card.shake .royal-card-inner {
    animation: card-shake 0.5s ease;
}

.royal-card.flipped.shake .royal-card-inner {
    animation: card-shake-flipped 0.5s ease;
}

@keyframes card-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

@keyframes card-shake-flipped {
    0%, 100% { transform: rotateY(180deg) translateX(0); }
    20% { transform: rotateY(180deg) translateX(-6px); }
    40% { transform: rotateY(180deg) translateX(6px); }
    60% { transform: rotateY(180deg) translateX(-4px); }
    80% { transform: rotateY(180deg) translateX(4px); }
}

.royal-card-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 2rem;
    overflow: hidden;
}

.royal-card-back {
    background: linear-gradient(145deg, #3d2a6e 0%, #1e1245 50%, #2a1850 100%);
    border: 2px solid rgba(255, 179, 71, 0.45);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), inset 0 0 30px rgba(255, 179, 71, 0.08);
}

.royal-card-back::before {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 179, 71, 0.2);
    background: repeating-linear-gradient(45deg, transparent, transparent 4px, rgba(255, 179, 71, 0.03) 4px, rgba(255, 179, 71, 0.03) 8px);
}

.royal-card-back i {
    color: var(--amber);
    font-size: 1.6rem;
    filter: drop-shadow(0 0 12px rgba(255, 179, 71, 0.6));
    position: relative;
    z-index: 1;
    animation: crown-glow 2s ease-in-out infinite;
}

@keyframes crown-glow {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(255, 179, 71, 0.4)); }
    50% { filter: drop-shadow(0 0 20px rgba(255, 179, 71, 0.9)); }
}

.royal-card-front {
    transform: rotateY(180deg);
    border: 2px solid rgba(255, 179, 71, 0.5);
}

.royal-card-front i {
    filter: drop-shadow(0 0 10px currentColor);
    transition: transform 0.3s ease;
}

.royal-card.flipped .royal-card-front i {
    animation: icon-reveal 0.4s ease 0.2s both;
}

@keyframes icon-reveal {
    from { transform: scale(0) rotate(-180deg); opacity: 0; }
    to { transform: scale(1) rotate(0deg); opacity: 1; }
}

.royal-card.matched .royal-card-front {
    box-shadow: 0 0 30px rgba(46, 230, 166, 0.5);
    border-color: var(--mint);
}

.royal-card-front.hearts { background: linear-gradient(145deg, #5a2048 0%, #3a1840 100%); color: #ff6b9d; }
.royal-card-front.spades { background: linear-gradient(145deg, #1e3058 0%, #0f1e38 100%); color: var(--sky); }
.royal-card-front.diamonds { background: linear-gradient(145deg, #4a2060 0%, #2a1040 100%); color: #ff6b6b; }
.royal-card-front.clubs { background: linear-gradient(145deg, #1e4538 0%, #0f3028 100%); color: var(--mint); }

.royal-victory {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(10, 6, 24, 0.88);
    border-radius: 28px;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.royal-victory.show {
    opacity: 1;
    visibility: visible;
}

.royal-victory-box {
    text-align: center;
    padding: 32px;
    animation: victory-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes victory-pop {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.royal-victory-box i {
    font-size: 3rem;
    color: var(--amber);
    margin-bottom: 16px;
    filter: drop-shadow(0 0 20px rgba(255, 179, 71, 0.8));
    animation: crown-glow 1.5s ease-in-out infinite;
}

.royal-victory-box h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.royal-victory-box p {
    color: var(--text-dim);
    margin-bottom: 20px;
}

.royal-reset {
    display: block;
    width: 100%;
    margin-top: 28px;
    padding: 15px;
    border: 1px solid rgba(255, 179, 71, 0.45);
    border-radius: var(--radius-pill);
    background: rgba(255, 179, 71, 0.06);
    color: var(--amber);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
}

.royal-reset:hover {
    background: rgba(255, 179, 71, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 179, 71, 0.15);
}

.crystal-game {
    max-width: 540px;
    margin: 0 auto;
    padding: 32px 28px 36px;
    border-radius: 28px;
    border: 2px solid rgba(46, 230, 166, 0.25);
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(46, 230, 166, 0.1) 0%, transparent 50%),
        linear-gradient(165deg, #041820 0%, #082830 50%, #061018 100%);
    box-shadow:
        0 0 60px rgba(46, 230, 166, 0.12),
        0 24px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.crystal-game::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 70%, rgba(0, 206, 201, 0.06) 0%, transparent 40%);
    pointer-events: none;
    animation: crystal-ambient 5s ease-in-out infinite alternate;
}

@keyframes crystal-ambient {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

.crystal-game-hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    position: relative;
    z-index: 2;
}

.crystal-game-hud span {
    color: var(--mint);
    font-weight: 700;
}

.crystal-game-hud .crystal-combo {
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    background: rgba(255, 107, 107, 0.15);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: var(--coral);
    font-size: 0.8rem;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.crystal-game-hud .crystal-combo.active {
    opacity: 1;
    transform: scale(1);
    animation: combo-pulse 0.5s ease;
}

@keyframes combo-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.crystal-grid-wrap {
    position: relative;
    z-index: 2;
    padding: 14px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(46, 230, 166, 0.2);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.4);
}

.crystal-grid-wrap.match-glow {
    animation: grid-glow 0.5s ease;
}

@keyframes grid-glow {
    0%, 100% { box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.4); }
    50% { box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.4), 0 0 40px rgba(46, 230, 166, 0.3); }
}

.crystal-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
}

.crystal-gem {
    aspect-ratio: 1;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: clamp(0.75rem, 2.2vw, 1rem);
    display: grid;
    place-items: center;
    position: relative;
    transition: transform 0.2s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.2s ease;
    overflow: hidden;
}

.crystal-gem::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 20%;
    width: 35%;
    height: 25%;
    background: rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
}

.crystal-gem::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.15);
    pointer-events: none;
}

.crystal-gem i {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.2s ease;
}

.crystal-gem:hover:not(:disabled):not(.locked) {
    transform: scale(1.12);
    z-index: 4;
}

.crystal-gem:hover:not(:disabled):not(.locked) i {
    transform: scale(1.1);
}

.crystal-gem.selected {
    transform: scale(1.18);
    z-index: 5;
    animation: gem-selected 0.8s ease infinite;
}

@keyframes gem-selected {
    0%, 100% { box-shadow: 0 0 16px rgba(255, 255, 255, 0.5); }
    50% { box-shadow: 0 0 24px rgba(255, 255, 255, 0.8), 0 0 40px rgba(46, 230, 166, 0.4); }
}

.crystal-gem.swapping {
    z-index: 6;
    transition: transform 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.crystal-gem.pop {
    animation: crystal-pop 0.45s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
    z-index: 7;
}

@keyframes crystal-pop {
    0% { transform: scale(1); opacity: 1; }
    40% { transform: scale(1.35); opacity: 0.9; filter: brightness(1.5); }
    100% { transform: scale(0) rotate(90deg); opacity: 0; }
}

.crystal-gem.fall-in {
    animation: crystal-fall-in 0.4s cubic-bezier(0.34, 1.2, 0.64, 1) backwards;
}

@keyframes crystal-fall-in {
    from { transform: translateY(-120%) scale(0.6); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.crystal-gem.locked {
    pointer-events: none;
}

.crystal-gem.invalid {
    animation: gem-invalid 0.4s ease;
}

@keyframes gem-invalid {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.gem-ruby { background: linear-gradient(145deg, #ff6b7a 0%, #c0392b 100%); box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4), inset 0 -4px 8px rgba(0, 0, 0, 0.2); color: rgba(255, 255, 255, 0.9); }
.gem-sapphire { background: linear-gradient(145deg, #5dade2 0%, #2471a3 100%); box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4), inset 0 -4px 8px rgba(0, 0, 0, 0.2); color: rgba(255, 255, 255, 0.9); }
.gem-emerald { background: linear-gradient(145deg, #58d68d 0%, #1e8449 100%); box-shadow: 0 4px 12px rgba(46, 204, 113, 0.4), inset 0 -4px 8px rgba(0, 0, 0, 0.2); color: rgba(255, 255, 255, 0.9); }
.gem-amethyst { background: linear-gradient(145deg, #bb8fce 0%, #7d3c98 100%); box-shadow: 0 4px 12px rgba(155, 89, 182, 0.4), inset 0 -4px 8px rgba(0, 0, 0, 0.2); color: rgba(255, 255, 255, 0.9); }
.gem-topaz { background: linear-gradient(145deg, #f7dc6f 0%, #d4ac0d 100%); box-shadow: 0 4px 12px rgba(241, 196, 15, 0.4), inset 0 -4px 8px rgba(0, 0, 0, 0.2); color: rgba(255, 255, 255, 0.95); }
.gem-aqua { background: linear-gradient(145deg, #48c9b0 0%, #148f77 100%); box-shadow: 0 4px 12px rgba(0, 206, 201, 0.4), inset 0 -4px 8px rgba(0, 0, 0, 0.2); color: rgba(255, 255, 255, 0.9); }

.crystal-spark {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 20;
    animation: spark-fly 0.6s ease-out forwards;
}

@keyframes spark-fly {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--sx), var(--sy)) scale(0); opacity: 0; }
}

.crystal-hint {
    text-align: center;
    margin-top: 16px;
    font-size: 0.82rem;
    color: var(--text-muted);
    position: relative;
    z-index: 2;
}

.crystal-score-pop {
    position: absolute;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--mint);
    pointer-events: none;
    z-index: 30;
    animation: score-float 0.8s ease-out forwards;
    text-shadow: 0 0 10px rgba(46, 230, 166, 0.8);
}

@keyframes score-float {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-40px) scale(1.2); }
}

@media (max-width: 575px) {
    .neon-game,
    .royal-game,
    .crystal-game {
        padding: 24px 16px 28px;
    }

    .neon-reels-wrap {
        padding: 14px 10px;
    }

    .neon-symbol {
        height: 64px;
        font-size: 1.8rem;
    }

    .royal-grid {
        gap: 10px;
    }

    .royal-card-face {
        font-size: 1.5rem;
    }

    .crystal-grid {
        gap: 3px;
    }

    .crystal-grid-wrap {
        padding: 10px;
    }
}
