	.loader {
	  border: 16px solid #f3f3f3; /* Light grey */
	  border-top: 16px solid #3498db; /* Blue */
	  border-radius: 50%;
	  width: 120px;
	  height: 120px;
	  animation: spin 2s linear infinite;
	}

	@keyframes spin {
	  0% { transform: rotate(0deg); }
	  100% { transform: rotate(360deg); }
	}

	body {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            background-color: #0a192f; /* Dark blue navy color */
            color: #ffffff; /* White text for better contrast */
	}

        .slot-machine {
            width: 250px;
            height: 250px;
            display: inline-flex;
            justify-content: center;
            margin: 1rem 0;
            padding: 1rem;
            border-radius: 20px;
            background-color: rgba(255, 255, 255, 0.05);
            display: grid;
            grid-template-columns: auto auto auto;
        }
        .slot-machine::after {
            content: '';
            position: absolute;
            top: -5px;
            left: -5px;
            right: -5px;
            bottom: -5px;
            border-radius: 20px;
            opacity: 0.5;
            z-index: -1;
            background: linear-gradient(45deg, #8b5cf6, #6366f1);
            animation: pulse 3s infinite alternate;
        }

        @keyframes pulse {
            0% {
                opacity: 0.3;
            }
            100% {
                opacity: 0.8;
            }
        }
		@keyframes spin {
			0% {
				transform: translateX(0);
			}
			100% {
				transform: translateX(-250px);
			}
		}

        button {
            /* background: linear-gradient(to bottom right, #EF4765, #FF9A5A); */
            border: 0;
            border-radius: 0;
            clip-path: polygon(8% 0, 100% 0, 92% 100%, 0% 100%);
            color: #000000;
            background: rgb(111, 0, 255);
            cursor: pointer;
            display: inline-block;
            font-size: 16px;
            font-weight: 250;
            line-height: 2.5;
            outline: transparent;
            padding: 0 1.4rem;
            text-align: center;
            text-decoration: none;
            transition: box-shadow .2s ease-in-out, clip-path 0.3s ease;
            user-select: none;
            -webkit-user-select: none;
            touch-action: manipulation;
            white-space: nowrap;
        }
        button:hover {
            box-shadow: 0 0 .25rem rgba(0, 0, 0, 0.5), -.125rem -.125rem 1rem rgba(239, 71, 101, 0.5), .125rem .125rem 1rem rgba(255, 154, 90, 0.5);
            clip-path: polygon(6% 0, 100% 0, 94% 100%, 0% 100%);
        }
        button:disabled {
            border: 1px solid #999999;
            background-color: #cccccc;
            color: #666666;
            clip-path: polygon(8% 0, 100% 0, 92% 100%, 0% 100%);
        }
        
        #result {
            margin-top: 1rem;
            font-size: 1.2rem;
            font-weight: bold;
        }
	
		.hex {
		  height: 180px;
		  
		  aspect-ratio: 1/cos(30deg);
		  clip-path: polygon(50% -50%,100% 50%,50% 150%,0 50%);
		  background: linear-gradient(-45deg,transparent,#5E9FA3);
		  border-radius: 5px;
          z-index:1
		}

		.hex-alt {
          --b: 50px;
		  height: 250px;
		  aspect-ratio: cos(30deg);
		  /* notice how I simply switched the x/y from the previous polygon, easy! */
		  clip-path: polygon(-50% 50%,50% 100%,150% 50%,50% 0);
		  background: linear-gradient(45deg,transparent,#FFC000);
		}
		.hexagon-border {
		  --b: 10px; /* adjust to control the border  */
		  height: 260px;
          padding-left: 10px;
          padding-top: 10px;
		  aspect-ratio: cos(30deg);
		  clip-path: polygon(-50% 50%,50% 100%,150% 50%,50% 0);
		  background: linear-gradient(45deg,#FFC000,transparent);
          z-index:0
		}
		img {
		  object-fit:cover;
		}
        
        .click_effect{
        position: absolute;
        width: 80px;
        height: 80px;
        border: 5px solid #e91e63;
        pointer-events: none;
        margin-top: -45px;
        margin-left: -45px;
        opacity: 0;
        border-radius: 50%;
        animation-name: click_animation;
        animation-duration: 0.6s;
        animation-timing-function: linear;
        }
        
        @keyframes click_animation {
        /* You can do it in two ways */
                /* First */

            /* from{
                opacity: 1;
                transform: scale(0);
            }
            to{
                opacity: 0;
                transform: scale(1);
            } */

            
            /* Second */
            0%{
                opacity: 1;
                transform: scale(0.1);
            }
            10%{
                opacity: 1;
                transform: scale(0.2);
            }
            20%{
                opacity: 1;
                transform: scale(0.3);
            }
            30%{
                opacity: 1;
                transform: scale(0.4);
            }
            40%{
                opacity: 0.9;
                transform: scale(0.5);
            }
            50%{
                opacity: 0.7;
                transform: scale(0.6);
            }
            60%{
                opacity: 0.5;
                transform: scale(0.7);
            }
            70%{
                opacity: 0.3;
                transform: scale(0.8);
            }
            80%{
                opacity: 0.1;
                transform: scale(0.9);
            }
            90%{
                opacity: 0;
                transform: scale(1);
            }
            100%{
                opacity: 0;
                transform: scale(1);
            }
        }

        button:before {
            content: "";
            position: absolute;
            inset: -0.25em;
            z-index: -1;
            border: 0.25em solid hsl(260 97% 50% / 0.5);
            clip-path: polygon(8% 0, 100% 0, 92% 100%, 0% 100%);
            opacity: var(--active, 0);
            transition: opacity var(--transition);
        }

        .spark {
            position: absolute;
            inset: 0;
            clip-path: polygon(8% 0, 100% 0, 92% 100%, 0% 100%);
            rotate: 0deg;
            overflow: hidden;
            mask: linear-gradient(white, transparent 50%);
            animation: flip calc(var(--spark) * 2) infinite steps(2, end);
        }

        @keyframes flip {
            to {
                rotate: 360deg;
            }
        }
        /* Popup container - can be anything you want */
        .popup {
        position: relative;
        display: inline-block;
        cursor: pointer;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        }

        /* The actual popup */
        .popup .popuptext {
        visibility: hidden;
        width: 160px;
        background-color: #555;
        color: #fff;
        text-align: center;
        clip-path: polygon(5% 0, 100% 0, 95% 100%, 0% 100%);
        padding: 8px 0;
        position: absolute;
        z-index: 1;
        bottom: 125%;
        left: 50%;
        margin-left: -80px;
        }

        /* Popup arrow */
        .popup .popuptext::after {
        content: "";
        position: absolute;
        top: 100%;
        left: 50%;
        margin-left: -5px;
        border-width: 5px;
        border-style: solid;
        border-color: #555 transparent transparent transparent;
        }

        /* Toggle this class - hide and show the popup */
        .popup .show {
        visibility: visible;
        -webkit-animation: fadeIn 0.5s;
        animation: fadeIn 0.5s;
        }
        .popup .fade {
        visibility: hidden;
        opacity: 0;
        transition: visibility 0s 1s, opacity 1s linear;
        }

        /* Add animation (fade in the popup) */
        @-webkit-keyframes fadeIn {
        from {opacity: 0;} 
        to {opacity: 1;}
        }

        @keyframes fadeIn {
        from {opacity: 0;}
        to {opacity:1 ;}
        }
        .popuptext {
        display: none;
        }
        .popuptext.show {
        display: block;
        }


.prize-symbol.winner {
    animation: pulse 0.5s infinite;
}

.winner-announcement {
    text-align: center;
    padding: 20px;
    clip-path: polygon(4% 0, 100% 0, 96% 100%, 0% 100%);
    margin-top: 20px;
}

/* Tier-specific styles */
.common { background-color: #c0c0c0; }
.rare { background-color: #4169e1; color: white; }
.epic { background-color: #9400d3; color: white; }
.legendary { 
    background: linear-gradient(45deg, #ffd700, #ff8c00);
    color: white;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.prize-image {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 10px;
}

.prize-display {
    text-align: center;
    padding: 15px;
    background: white;
    clip-path: polygon(4% 0, 100% 0, 96% 100%, 0% 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


/* Inventory Panel */
.inventory-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 400px;
    max-height: calc(100vh - 100px);
    background: white;
    clip-path: polygon(3% 0, 100% 0, 97% 100%, 0% 100%);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.inventory-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.close-button {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0 5px;
    clip-path: polygon(8% 0, 100% 0, 92% 100%, 0% 100%);
    transition: color 0.2s, clip-path 0.3s ease;
}

.close-button:hover {
    color: #333;
    clip-path: polygon(6% 0, 100% 0, 94% 100%, 0% 100%);
}

.inventory-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Inventory Tabs */
.inventory-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
}

.tab-button {
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    clip-path: polygon(8% 0, 100% 0, 92% 100%, 0% 100%);
    transition: all 0.3s ease;
}

.tab-button:hover {
    background: #f8f9fa;
    color: #333;
}

.tab-button.active {
    background: #e9ecef;
    color: #333;
    font-weight: bold;
}

/* Inventory Items */
.inventory-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.inventory-item {
    background: #f8f9fa;
    clip-path: polygon(4% 0, 100% 0, 96% 100%, 0% 100%);
    padding: 10px;
    text-align: center;
    transition: all 0.3s ease;
    color: black;
}

.inventory-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.inventory-item img {
    width: 64px;
    height: 64px;
    margin-bottom: 8px;
}

.item-name {
    font-weight: bold;
    margin: 5px 0;
    font-size: 14px;
    color: black;
}

.item-quantity {
    color: #666;
    font-size: 12px;
}

/* Rarity Colors */
.item-common { border: 1px solid #8b4513; }
.item-rare { border: 1px solid #4169e1; }
.item-epic { border: 1px solid #9400d3; }
.item-legendary { border: 1px solid #ffd700; }

/* Animation */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.inventory-panel.show {
    animation: slideIn 0.3s ease forwards;
}

.inventory-panel.hide {
    animation: slideOut 0.3s ease forwards;
}