        :root {
            --primary-gradient: linear-gradient(135deg, #0f3d24 0%, #1e5c38 100%);
            --accent-gold: #fbbf24;
            --accent-orange: #f97316;
            --glass-bg: rgba(255, 255, 255, 0.95);
            --glass-border: rgba(255, 255, 255, 0.3);
            --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        }

        * {
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            font-family: 'Lato', sans-serif;
            background: radial-gradient(circle at center, #1a472a 0%, #0d2818 100%);
            min-height: 100vh;
            min-height: -webkit-fill-available;
            overflow-x: hidden;
            touch-action: manipulation;
            color: #1f2937;
        }

        html {
            height: -webkit-fill-available;
        }

        .title-font {
            font-family: 'Cinzel', serif;
            letter-spacing: 0.05em;
        }

        /* Card Styles - Mobile Optimized */
        .card {
            border-radius: 10px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.1);
            transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
            cursor: pointer;
            position: relative;
            user-select: none;
            overflow: hidden;
            background: #fff;
            flex-shrink: 0;
            border: 1px solid rgba(0, 0, 0, 0.1);
        }

        .card-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 8px;
            pointer-events: none;
        }

        .card:hover:not(.card-disabled) {
            transform: translateY(-8px) scale(1.05);
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
            z-index: 10;
        }

        @media (max-width: 640px) {
            .card:hover:not(.card-disabled) {
                transform: translateY(-4px) scale(1.02);
            }
        }

        .card-back {
            background: repeating-linear-gradient(45deg, #7f1d1d 0px, #7f1d1d 10px, #991b1b 10px, #991b1b 20px);
            border: 3px solid #f59e0b;
            /* Gold border */
            box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
        }

        .card-back::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 60%;
            height: 60%;
            background-image: url('../favicon.svg');
            background-size: contain;
            background-repeat: no-repeat;
            background-position: center;
            opacity: 0.8;
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
        }

        .card-playable {
            animation: glowPulse 2s infinite;
            box-shadow: 0 0 15px rgba(34, 197, 94, 0.5);
            border: 2px solid #22c55e;
        }

        .card-selected {
            transform: translateY(-15px) scale(1.05) !important;
            box-shadow: 0 0 30px rgba(251, 191, 36, 0.6), 0 10px 20px rgba(0, 0, 0, 0.3) !important;
            outline: 4px solid #fbbf24;
            z-index: 20;
        }

        .card-highlight {
            box-shadow: 0 0 20px rgba(249, 115, 22, 0.8) !important;
            outline: 3px solid #f97316;
            animation: highlightBounce 0.5s ease;
        }

        .card-captured {
            animation: captureCard 0.6s ease-out forwards;
        }

        /* Settings Panel - Bottom Popup */
        .settings-panel {
            position: fixed;
            bottom: 80px;
            left: 20px;
            background: rgba(15, 23, 42, 0.95);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            padding: 20px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
            border: 1px solid rgba(255, 255, 255, 0.1);
            z-index: 200;
            min-width: 220px;
            animation: settingsPopup 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            transform-origin: bottom left;
        }

        @keyframes settingsPopup {
            from {
                transform: scale(0.5) translateY(20px);
                opacity: 0;
            }

            to {
                transform: scale(1) translateY(0);
                opacity: 1;
            }
        }

        /* Floating Emote Animation - Restored */
        @keyframes floatEmote {
            0% {
                transform: translate(-50%, 0) scale(0.5);
                opacity: 0;
            }

            10% {
                transform: translate(-50%, -20px) scale(1.2);
                opacity: 1;
            }

            50% {
                transform: translate(-50%, -60px) scale(1) rotate(10deg);
            }

            100% {
                transform: translate(-50%, -100px) scale(0.8) rotate(-10deg);
                opacity: 0;
            }
        }

        .floating-emote {
            position: absolute;
            top: -20px;
            left: 50%;
            /* transform is handled by animation */
            font-size: 40px;
            animation: floatEmote 2.5s ease-out forwards;
            pointer-events: none;
            z-index: 50;
            filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
        }

        /* Emote Menu */
        .emote-menu {
            position: absolute;
            bottom: 110%;
            left: 50%;
            transform: translateX(-50%);
        }

        @keyframes captureCard {
            0% {
                transform: scale(1);
                opacity: 1;
            }

            50% {
                transform: scale(1.2);
                opacity: 0.8;
            }

            100% {
                transform: scale(0);
                opacity: 0;
            }
        }

        .card-fallback {
            background: linear-gradient(165deg, #ffffff 0%, #f3f4f6 100%);
            border: 2px solid #e5e7eb;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        @keyframes glowPulse {

            0%,
            100% {
                box-shadow: 0 0 5px rgba(34, 197, 94, 0.4);
                border-color: rgba(34, 197, 94, 0.5);
            }

            50% {
                box-shadow: 0 0 20px rgba(34, 197, 94, 0.8);
                border-color: #22c55e;
            }
        }

        @keyframes highlightBounce {

            0%,
            100% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.05);
            }
        }

        @keyframes dealCard {
            from {
                transform: translateY(-200px) rotate(15deg) scale(0.5);
                opacity: 0;
            }

            to {
                transform: translateY(0) rotate(0) scale(1);
                opacity: 1;
            }
        }

        .deal-animation {
            animation: dealCard 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        /* Last Move Overlay */
        .last-move-overlay {
            animation: lastMoveAppear 0.3s ease-out, lastMoveFade 0.5s ease-in 2.5s forwards;
            background: rgba(0, 0, 0, 0.85);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        @keyframes lastMoveAppear {
            from {
                transform: scale(0.8) translateY(20px);
                opacity: 0;
            }

            to {
                transform: scale(1) translateY(0);
                opacity: 1;
            }
        }

        @keyframes lastMoveFade {
            to {
                opacity: 0;
                pointer-events: none;
            }
        }

        /* Table felt texture */
        .table-felt {
            background: radial-gradient(ellipse at center, #235c36 0%, #174226 60%, #0b2414 100%);
            border: 12px solid #5d4037;
            /* Wood border */
            border-radius: 24px;
            box-shadow:
                inset 0 0 80px rgba(0, 0, 0, 0.6),
                0 20px 50px rgba(0, 0, 0, 0.5),
                0 0 0 2px rgba(255, 255, 255, 0.05);
            /* Highlight on wood */
            position: relative;
        }

        @media (max-width: 640px) {
            .table-felt {
                border-width: 6px;
                border-radius: 16px;
            }
        }

        /* Notification Toast */
        .toast {
            animation: toastSlide 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            backdrop-filter: blur(12px);
            background: rgba(255, 255, 255, 0.9);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        }

        @keyframes toastSlide {
            from {
                transform: translateX(120%);
                opacity: 0;
            }

            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        /* Chat Styles - Mobile Optimized */
        .chat-container {
            position: fixed;
            bottom: 20px;
            right: 20px;
            width: 320px;
            max-width: calc(100vw - 40px);
            z-index: 100;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        @media (max-width: 640px) {
            .chat-container {
                width: calc(100vw - 32px);
                left: 16px;
                right: 16px;
                bottom: 16px;
            }

            .chat-container.chat-minimized {
                width: auto;
                left: auto;
            }
        }

        .chat-box {
            background: rgba(17, 24, 39, 0.9);
            backdrop-filter: blur(16px);
            border-radius: 16px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
            border: 1px solid rgba(255, 255, 255, 0.1);
            overflow: hidden;
        }

        .chat-messages {
            height: 200px;
            overflow-y: auto;
            scrollbar-width: thin;
        }

        .chat-message {
            animation: messageSlide 0.3s ease;
        }

        @keyframes messageSlide {
            from {
                transform: translateY(10px);
                opacity: 0;
            }

            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        /* Player avatar */
        .player-avatar {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            font-weight: 700;
            background: linear-gradient(135deg, #e5e7eb 0%, #9ca3af 100%);
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
            border: 3px solid rgba(255, 255, 255, 0.9);
            flex-shrink: 0;
            position: relative;
            color: #1f2937;
        }

        @media (max-width: 640px) {
            .player-avatar {
                width: 36px;
                height: 36px;
                font-size: 15px;
                border-width: 2px;
            }
        }

        /* Score badge */
        .score-badge {
            background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
            padding: 4px 10px;
            border-radius: 20px;
            font-weight: 800;
            font-size: 12px;
            color: #fff;
            box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
            border: 1px solid rgba(255, 255, 255, 0.3);
        }

        /* Button styles */
        .btn-modern {
            border: none;
            cursor: pointer;
            transition: all 0.2s ease;
            font-family: 'Lato', sans-serif;
            letter-spacing: 0.5px;
            position: relative;
            overflow: hidden;
        }

        .btn-modern:active {
            transform: scale(0.98);
        }

        .btn-primary {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .btn-primary:hover {
            background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
            transform: translateY(-2px);
        }

        .btn-secondary {
            background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
            box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .btn-secondary:hover {
            background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
            transform: translateY(-2px);
        }

        .btn-glass {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: white;
        }

        .btn-glass:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        /* Config Panel */
        .glass-panel {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(20px);
            border-radius: 24px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
            border: 1px solid rgba(255, 255, 255, 0.5);
        }

        /* Settings Button - Fixed Bottom Left */
        .settings-btn {
            position: fixed;
            bottom: 20px;
            left: 20px;
            width: 48px;
            height: 48px;
            background: rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(10px);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 9999;
            /* Max z-index */
            transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            border: 1px solid rgba(255, 255, 255, 0.3);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            font-size: 24px;
        }

        .settings-btn:hover {
            background: rgba(255, 255, 255, 0.25);
            transform: scale(1.1) rotate(90deg);
        }

        /* Input Icons - High Visibility */
        .input-icon {
            position: absolute;
            left: 16px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 20px;
            pointer-events: none;
            z-index: 10;
            filter: none !important;
            /* Prevent blur inheritance */
            opacity: 1 !important;
        }

        /* Emotes */
        .emote-menu {
            bottom: 110%;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border-radius: 50px;
            padding: 8px 12px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        }

        .emote-btn {
            transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        .emote-btn:hover {
            transform: scale(1.3);
            background: transparent;
        }

        /* Hand Container - Prevent Clipping */
        .hand-container {
            padding-top: 30px !important;
            /* Space for hover/selection lift */
            padding-bottom: 15px !important;
            margin-top: -10px;
            /* Keep overflow-x: auto from utility class */
        }

        .card-container {
            padding: 10px;
        }

        /* Scrollbar */
        ::-webkit-scrollbar {
            width: 6px;
        }

        ::-webkit-scrollbar-track {
            background: transparent;
        }

        ::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.2);
            border-radius: 10px;
        }