    * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Arial', sans-serif;
      
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }
 
        /* Header Styles */
        .header {
            background: black;
            padding: 15px 20px;
            position: relative;
            z-index: 100;
        }

        .header-content {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .logo-container {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .logo {
            height: 60px;
            width: auto;
            transition: transform 0.3s ease;
        }

        .logo:hover {
            transform: scale(1.05);
        }

        .game-title {
            color: #ffd700;
            font-size: 24px;
            font-weight: bold;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
            margin: 0;
        }

        .game-subtitle {
            color: #d4af37;
            font-size: 14px;
            margin: 0;
            font-style: italic;
        }

        .header-stats {
            display: flex;
            gap: 20px;
            align-items: center;
        }

        .header-stat {
            text-align: center;
            color: #ffffff;
        }

        .header-stat-label {
            font-size: 12px;
            color: #d4af37;
            margin-bottom: 2px;
        }

        .header-stat-value {
            font-size: 18px;
            font-weight: bold;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
        }

        /* Audio Controls */
        .audio-controls {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .audio-button {
            background: linear-gradient(145deg, #6b5537, #5a4332);
            border: 2px solid #4a3728;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            color: #ffd700;
            font-size: 16px;
            position: relative;
        }

        .audio-button:hover {
            background: linear-gradient(145deg, #5a4332, #6b5537);
            transform: scale(1.1);
        }

        .audio-button.muted {
            background: linear-gradient(145deg, #8b0000, #660000);
            color: #ffffff;
        }

        /* Main Content */
        .main-content {
            flex: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            background: url('../img/bgvikings.png') no-repeat center;
            background-size: cover;
        }

        .game-container {
            /* background: linear-gradient(145deg, #8b6f47, #6b5537); */
            background: url(../img/woodshadow.png) no-repeat center;
            background-size: auto;
            border-radius: 20px;
            padding: 30px;
            /* box-shadow:
                0 20px 40px rgba(0, 0, 0, 0.4),
                inset 0 2px 4px rgba(255, 255, 255, 0.1); */
            /* border: 3px solid #5a4332; */
            max-width: 700px;
            width: 100%;
            position: relative; 
        }

        .header-game {
            display: flex;
            justify-content: space-between;
            margin-bottom: 30px;
        }

        .stat-box {
            background: url(../img/coins.png) no-repeat center;
            background-size: contain;
            border-radius: 15px;
            padding: 35px 45px;
            width: 180px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-content: center;
            align-items: center;
        }
        .stat-box2 {
            background: url(../img/coins.png) no-repeat center;
            background-size: contain;
            border-radius: 15px;
            padding: 35px 45px;
            width: 180px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-content: center;
            align-items: center;
        }

        .stat-label {
            color: #ffd700;
            font-size: 18px;
            font-weight: bold;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
            margin-bottom: 5px;
        }

        .stat-value {
            color: #ffffff;
            font-size: 28px;
            font-weight: bold;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
        }

        .slot-machine {
            background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
            border-radius: 15px;
            padding: 20px;
            margin-bottom: 20px;
            border: 3px solid #333;
            box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.5);
        }

        .reels {
            display: flex;
            gap: 12px;
            justify-content: center;
            margin-bottom: 20px;
        }

        .reel {
            width: 80px;
            height: 100px;
            background: #000;
            border-radius: 8px;
            border: 2px solid #444;
            overflow: hidden;
            position: relative;
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
            perspective: 500px;
        }

        .card {
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            /* background: #757575; */
            background: linear-gradient(to bottom, #00b4db, #0083b0, #005f73, #003f5c);
            border-radius: 6px;
            position: absolute;
            top: 0;
            left: 0;
            transition: all 0.2s ease;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
            /* padding: 5px; */
            transform: translateZ(0);
            backface-visibility: hidden;
        }

        /* New rolling casino animation */
        .card.spinning {
            animation: casinoRoll 0.2s linear infinite;
            will-change: transform;
        }

        @keyframes casinoRoll {
            0% {
                transform: translateY(-100%) rotateX(30deg);
            }

            100% {
                transform: translateY(100%) rotateX(-30deg);
            }
        }

        /* Ensure final cards are properly displayed */
        .card.final {
            animation: none !important;
            transform: translateZ(0) !important;
            opacity: 1 !important;
            will-change: auto;
        }

        .card-image {
            width: 100%;
            height: 100%;
            object-fit: contain;
            max-width: 100px;
            max-height: 100px;
            pointer-events: none;
        }

        .chest {
            background: linear-gradient(145deg, #ffd700, #ffed4e);
            color: #8b6914;
            font-size: 30px;
            font-weight: bold;
            border: 2px solid #b8860b;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        }

        .skull {
            background: #5b5959;
            /* border: 2px solid #8b0000; */
            box-shadow:
                0 2px 4px rgba(0, 0, 0, 0.5),
                0 0 10px rgba(139, 0, 0, 0.3);
            animation: ominousGlow 2s ease-in-out infinite alternate;
        }

        @keyframes ominousGlow {
            0% {
                box-shadow:
                    0 2px 4px rgba(0, 0, 0, 0.5),
                    0 0 10px rgba(139, 0, 0, 0.3);
            }

            100% {
                box-shadow:
                    0 2px 4px rgba(0, 0, 0, 0.5),
                    0 0 20px rgba(139, 0, 0, 0.6);
            }
        }
        .message {
            /* background: linear-gradient(145deg, #27ae60, #2ecc71); */
            color: white;
            padding: 15px;
            border-radius: 10px;
            text-align: center;
            font-size: 25px;
            font-weight: bold;
            margin-bottom: 20px;
            /* border: 2px solid #229954; */
            /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); */
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
            min-height: 50px;
            display: flex;
            align-items: center;
            text-transform: uppercase;
            justify-content: center;
        }

        .message.lose {
            /* background: linear-gradient(145deg, #e74c3c, #c0392b); */
            color: #a93226 !important;
        }
        .message.win {
            color: #22c55e; /* or any green you like */
            font-weight: bold;
        }

        .message.curse {
            /* background: linear-gradient(145deg, #8b0000, #660000); */
            color: #a93226 !important;
            animation: curseFlash 0.5s ease-in-out 3;
        }

        .message.warning {
            /* background: linear-gradient(145deg, #f39c12, #e67e22); */
            color: #d68910 !important;
        }

        @keyframes curseFlash {

            0%,
            100% {
                opacity: 1;
            }

            50% {
                opacity: 0.7;
            }
        }

        .message.hidden {
            opacity: 0;
            transform: translateY(-10px);
        }

        .spin-button {
            background: linear-gradient(145deg, #27ae60, #2ecc71);
            color: white;
            border: none;
            padding: 15px 40px;
            font-size: 24px;
            font-weight: bold;
            border-radius: 50px;
            text-decoration: none;
            cursor: pointer;
            display: block;
            margin: 0 auto;
            box-shadow:
                0 6px 12px rgba(0, 0, 0, 0.3),
                inset 0 2px 4px rgba(255, 255, 255, 0.2);
            border: 3px solid #229954;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
            transition: all 0.2s ease;
        }

        .spin-button:hover {
            background: linear-gradient(145deg, #2ecc71, #27ae60);
            transform: translateY(-2px);
            box-shadow:
                0 8px 16px rgba(0, 0, 0, 0.4),
                inset 0 2px 4px rgba(255, 255, 255, 0.2);
        }

        .spin-button:active {
            transform: translateY(0);
            box-shadow:
                0 4px 8px rgba(0, 0, 0, 0.3),
                inset 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .spin-button:disabled {
            background: linear-gradient(145deg, #7f8c8d, #95a5a6);
            cursor: not-allowed;
            transform: none;
            border-color: #5d6d7e;
        }

        .stats-footer {
            margin-top: 20px;
            display: flex;
            justify-content: space-between;
            font-size: 14px;
            color: #d4af37;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
        }

        /* Footer Styles */
        .footer {
            background: black;
            box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.3);
            padding: 20px;
            color: #d4af37;
            text-align: center;
        }

        .footer-content {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 20px;
        }

        .footer-section {
            flex: 1;
            min-width: 200px;
        }

        .footer-title {
            color: white;
            font-size: 16px;
            font-weight: bold;
            margin-bottom: 10px;
        }

        .footer-text {
            font-size: 14px;
            line-height: 1.4;
            color: white;
        }

        .footer-links {
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .footer-link {
            color: white;
            text-decoration: none;
            font-size: 14px;
            transition: color 0.3s ease;
        }

        .footer-link:hover {
            color: #ffd700;
        }

        .footer-bottom {
            font-size: 12px;
            color: white;
        }

        /* Game Over Modal */
        .game-over-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            animation: fadeIn 0.5s ease;
        }

        .game-over-modal {
            background: linear-gradient(145deg, #8b6f47, #6b5537);
            border-radius: 20px;
            padding: 40px;
            text-align: center;
            border: 3px solid #5a4332;
            box-shadow:
                0 20px 40px rgba(0, 0, 0, 0.6),
                inset 0 2px 4px rgba(255, 255, 255, 0.1);
            max-width: 400px;
            width: 90%;
            animation: slideIn 0.5s ease;
        }

        .game-over-title {
            color: #e74c3c;
            font-size: 36px;
            font-weight: bold;
            margin-bottom: 20px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
        }

        .game-over-message {
            color: #ffffff;
            font-size: 18px;
            margin-bottom: 30px;
            line-height: 1.5;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
        }

        .game-over-stats {
            background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 30px;
            border: 2px solid #333;
        }

        .game-over-stats h3 {
            color: #ffd700;
            margin-bottom: 15px;
            font-size: 20px;
        }

        .game-over-stats div {
            color: #ffffff;
            margin-bottom: 8px;
            font-size: 16px;
        }

        .restart-button {
            background: linear-gradient(145deg, #e74c3c, #c0392b);
            color: white;
            border: none;
            padding: 15px 30px;
            font-size: 20px;
            font-weight: bold;
            border-radius: 50px;
            cursor: pointer;
            margin: 0 10px;
            box-shadow:
                0 6px 12px rgba(0, 0, 0, 0.3),
                inset 0 2px 4px rgba(255, 255, 255, 0.2);
            border: 3px solid #a93226;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
            transition: all 0.3s ease;
        }

        .play-again {
            padding-left: 57px;
            padding-right: 57px;
            margin-bottom: 20px;
        }

        .restart-button:hover {
            background: linear-gradient(145deg, #c0392b, #e74c3c);
            transform: translateY(-2px);
        }

        .bonus-button {
            background: linear-gradient(145deg, #f39c12, #e67e22);
            border-color: #d68910;
        }

        .bonus-button:hover {
            background: linear-gradient(145deg, #e67e22, #f39c12);
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(-50px) scale(0.9);
            }

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

        /* Responsive Design */
        @media (max-width: 768px) {
            .header-content {
                flex-direction: column;
                gap: 15px;
                text-align: center;
            }
            .slot-machine{
                padding:10px;
            }
            .logo {
                height: 70px;
            }

            .game-title {
                font-size: 20px;
            }

            .header-stats>button {
                display: none;
            }

            .header-stats {
                justify-content: center;
            }

            .main-content {
                padding: 10px;
            }

            .game-container {
                padding: 20px;
            }

            .header-game {
                /* flex-direction: column; */
                gap: 15px;
            }

            .reel {
                width: 60px;
                height: 80px;
            }

            .card-image {
                max-width: 45px;
                max-height: 60px;
            }

            .stats-footer {
                flex-direction: column;
                gap: 5px;
                text-align: center;
            }

            .footer-content {
                flex-direction: column;
                text-align: center;
            }

            .footer-links {
                justify-content: center;
            }

            .game-over-modal {
                padding: 30px 20px;
            }

            .game-over-title {
                font-size: 28px;
            }

            .restart-button {
                display: block;
                margin: 10px auto;
                width: 100%;
            }
            .spin-button{
                padding: 10px 30px;
                font-size: 15px;
            }
        }

        @media (max-width: 480px) {
            .stat-box{
                width: 150px;
            }
            .stat-box2{
                width: 170px;
            }
            .header {
                padding: 10px 15px;
            }

            .logo {
                height: 70px;
            }

            .game-title {
                font-size: 18px;
            }

            .game-subtitle {
                font-size: 12px;
            }

            .header-stat-value {
                font-size: 16px;
            }
            .header-game{
                justify-content: center;
            }
            .stat-label {
                font-size: 20px;
            }

            .stat-value {
                font-size: 24px;
            }

            .footer {
                padding: 20px;
            }

            .footer-text {
                font-size: 12px;
            }
        }

        /* Performance optimizations for mobile */
        @media (max-width: 768px) {
            .reel {
                transform: translateZ(0);
                perspective: 1000px;
            }

            .card {
                transform: translateZ(0);
                backface-visibility: hidden;
                -webkit-font-smoothing: antialiased;
            }
        }

        .audio-status {
            position: absolute;
            top: -5px;
            right: -5px;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: #ff0000;
            border: 2px solid white;
            transition: background 0.3s ease;
        }

        .audio-status.active {
            background: #00ff00;
        }

        /* Blinking light effect for music playing */
        .music-playing {
            animation: blink 1.5s infinite;
        }

        @keyframes blink {
            0% {
                opacity: 1;
            }

            50% {
                opacity: 0.5;
            }

            100% {
                opacity: 1;
            }
        }
        .action{
            display:flex;
            justify-content: center;
            #spinButton{
                width: 170px;
                cursor: pointer;
            }
        }
     
        @media (max-width: 480px) {
            .header-game{
                margin-bottom:10px;
            }
            #spinButton {
                width: 150px !important;
            }
        }