ProjectGenesis commited on
Commit
54f31d6
·
verified ·
1 Parent(s): 9b5d02f

<!DOCTYPE html>

Browse files

<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Nioplay Loot Box + Multiplier Demo</title>
<style>
:root {
--bg: #050505;
--accent: #ff8c00;
--accent-soft: rgba(255, 140, 0, 0.3);
--gold: #ffcc66;
--text-main: #f7f7f7;
--text-dim: #a7a7a7;
--loot-box-size: 90px;
--pill-width: 90px;
--pill-height: 40px;
--gap: 18px;
--transition-duration: 1100ms;
}

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

body {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 24px;
background: radial-gradient(circle at top, #1a0d00 0%, #000 55%);
font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
"Segoe UI", sans-serif;
color: var(--text-main);
}

.module {
width: 1100px;
max-width: 100%;
border-radius: 24px;
padding: 28px 32px 36px;
background:
radial-gradient(circle at top, rgba(255, 140, 0, 0.16), transparent 65%),
linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(10, 10, 10, 0.95));
box-shadow:
0 0 40px rgba(0, 0, 0, 0.9),
0 0 60px rgba(255, 140, 0, 0.35);
border: 1px solid rgba(255, 255, 255, 0.08);
backdrop-filter: blur(18px);
}

.label {
font-size: 12px;
letter-spacing: 0.24em;
text-transform: uppercase;
color: var(--text-dim);
margin-bottom: 6px;
}

.section {
margin-bottom: 24px;
}

.track-shell {
position: relative;
padding: 22px 0;
border-radius: 18px;
background:
radial-gradient(circle at top, rgba(255, 140, 0, 0.18), transparent 60%),
linear-gradient(to bottom, rgba(10, 10, 10, 0.98), rgba(5, 5, 5, 0.98));
box-shadow:
0 12px 30px rgba(0, 0, 0, 0.85),
inset 0 0 0 1px rgba(255, 255, 255, 0.04);
overflow: hidden;
}

.track-wrapper {
overflow: hidden;
padding: 0 70px;
}

.track {
display: flex;
align-items: center;
gap: var(--gap);
transform: translateX(0px);
will-change: transform;
}

.selection-window {
position: absolute;
top: 16px;
left: 50%;
transform: translateX(-50%);
border-radius: 16px;
border: 2px solid var(--accent);
box-shadow:
0 0 18px rgba(255, 140, 0, 0.9),
0 0 40px rgba(255, 140, 0, 0.4);
pointer-events: none;
z-index: 4;
}

.selection-window--loot {
width: var(--loot-box-size);
height: var(--loot-box-size) + 20px;
}

.selection-window--multi {
width: var(--pill-width);
height: var(--pill-height) + 12px;
}

.selection-window::before {
content: "";
position: absolute;
inset: -16px;
border-radius: inherit;
background: radial-gradient(
circle at center,
rgba(255, 140, 0, 0.14),
transparent 60%
);
opacity: 0.8;
}

/* Loot boxes */

.loot-box {
width: var(--loot-box-size);
height: var(--loot-box-size);
border-radius: 18px;
position: relative;
display: flex;
align-items: center;
justify-content: center;
border: 1px solid rgba(255, 255, 255, 0.08);
background: radial-gradient(circle at top, #171717, #050505);
box-shadow:
0 8px 18px rgba(0, 0, 0, 0.85),
0 0 18px rgba(0, 0, 0, 0.7);
overflow: hidden;
transition:
transform 160ms ease-out,
box-shadow 160ms ease-out,
border-color 160ms ease-out,
filter 160ms ease-out;
}

.loot-box::before {
content: "";
position: absolute;
inset: 8px;
border-radius: 14px;
border: 2px solid rgba(255, 255, 255, 0.16);
box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.9);
z-index: 1;
}

.loot-box-inner {
position: relative;
z-index: 2;
width: 48px;
height: 48px;
border-radius: 14px;
background: radial-gradient(circle at top, #222, #000);
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 0 14px rgba(0, 0, 0, 0.8);
}

.loot-box-inner::before {
content: "";
width: 22px;
height: 22px;
border-radius: 6px;
border: 2px solid rgba(255, 255, 255, 0.6);
box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.loot-box[data-rarity="green"] {
box-shadow: 0 0 18px rgba(0, 200, 120, 0.7);
}

.loot-box[data-rarity="blue"] {
box-shadow: 0 0 18px rgba(80, 160, 255, 0.8);
}

.loot-box[data-rarity="purple"] {
box-shadow: 0 0 20px rgba(160, 80, 255, 0.85);
}

.loot-box[data-rarity="gold"] {
box-shadow: 0 0 22px rgba(255, 190, 70, 0.95);
}

.loot-box.selected {
transform: scale(1.12);
border-color: rgba(255, 140, 0, 0.95);
filter: brightness(1.1);
box-shadow:
0 0 26px rgba(255, 140, 0, 0.95),
0 0 60px rgba(255, 140, 0, 0.75);
}

.loot-box.motion-blur {
filter: blur(1px) brightness(0.9);
opacity: 0.9;
}

/* Multiplier pills */

.multi-pill {
min-width: var(--pill-width);
height: var(--pill-height);
border-radius: 999px;
display: flex;
align-items: center;
justify-content: center;
font-size: 17px;
font-weight: 700;
color: #ffd8a0;
background: rgba(255, 255, 255, 0.08);
backdrop-filter: blur(6px);
box-shadow:
0 0 8px rgba(0, 0, 0, 0.6),
inset 0 0 6px rgba(255, 255, 255, 0.1);
transition:
transform 140ms ease-out,
color 140ms ease-out,
box-shadow 140ms ease-out,
filter 140ms ease-out;
}

.multi-pill.selected {
transform: scale(1.18);
color: #fff2cc;
box-shadow:
0 0 20px rgba(255, 140, 0, 0.95),
0 0 50px rgba(255, 140, 0, 0.6);
}

.multi-pill.motion-blur {
filter: blur(1px) brightness(0.95);
opacity: 0.9;
}

/* Spin button */

.actions {
display: flex;
justify-content: center;
margin-top: 10px;
}

.spin-btn {
min-width: 220px;
border: none;
border-radius: 999px;
padding: 12px 32px;
font-size: 14px;
font-weight: 700;
letter-spacing: 0.16em;
text-transform: uppercase;
cursor: pointer;
background: radial-gradient(circle at top, #ffe5a8, #ff8c00);
color: #1a0900;
box-shadow:
0 0 30px rgba(255, 140, 0, 0.95),
0 14px 26px rgba(0, 0, 0, 0.9);
position: relative;
overflow: hidden;
transition:
transform 120ms ease-out,
box-shadow 120ms ease-out,
filter 120ms ease-out;
}

.spin-btn::before {
content: "";
position: absolute;
inset: 0;
background: radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.35), transparent 60%);
opacity: 0.8;
pointer-events: none;
mix-blend-mode: screen;
}

.spin-btn:active {
transform: translateY(1px) scale(0.98);
box-shadow:
0 0 18px rgba(255, 140, 0, 0.8),
0 6px 10px rgba(0, 0, 0, 0.9);
filter: brightness(0.96);
}

.spin-btn.disabled {
cursor: wait;
filter: grayscale(0.1) brightness(0.9);
box-shadow:
0 0 14px rgba(255, 140, 0, 0.6),
0 8px 18px rgba(0, 0, 0, 0.9);
}

/* Popup */

.popup-backdrop {
position: fixed;
inset: 0;
display: none;
align-items: center;
justify-content: center;
background: radial-gradient(circle at center, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.95));
z-index: 50;
}

.popup-backdrop.visible {
display: flex;
}

.popup {
width: 360px;
max-width: 90%;
padding: 22px 22px 20px;
border-radius: 20px;
background:
radial-gradient(circle at top, rgba(255, 140, 0, 0.22), transparent 60%),
linear-gradient(135deg, rgba(25, 25, 25, 0.98), rgba(5, 5, 5, 0.98));
border: 1px solid rgba(255, 255, 255, 0.12);
box-shadow:
0 0 40px rgba(0, 0, 0, 1),
0 0 50px rgba(255, 140, 0, 0.85);
text-align: center;
position: relative;
overflow: hidden;
}

.popup::before {
content: "";
position: absolute;
inset: -40%;
background: radial-gradient(circle at center, rgba(255, 140, 0, 0.25), transparent 70%);
opacity: 0.7;
pointer-events: none;
}

.popup-title {
position: relative;
z-index: 1;
font-size: 14px;
letter-spacing: 0.25em;
text-transform: uppercase;
color: var(--text-dim);
margin-bottom: 8px;
}

.popup-total {
position: relative;
z-index: 1;
font-size: 30px;
font-weight: 800;
color: var(--gold);
text-shadow:
0 0 18px rgba(255, 204, 102, 0.9),
0 0 40px rgba(255, 140, 0, 0.85);
margin-bottom: 6px;
}

.popup-line {
position: relative;
z-index: 1;
font-size: 13px;
color: var(--text-dim);
margin-bottom: 3px;
}

.popup-close {
position: relative;
z-index: 1;
margin-top: 12px;
border: none;
border-radius: 999px;
padding: 8px 20px;
font-size: 13px;
font-weight: 600;
letter-spacing: 0.16em;
text-transform: uppercase;
cursor: pointer;
background: radial-gradient(circle at top, #ffe0a0, #ff8c00);
color: #1a0900;
box-shadow:
0 0 20px rgba(255, 140, 0, 0.9),
0 8px 16px rgba(0, 0, 0, 0.9);
}



@media
(max-width: 900px) {
.module {
padding: 20px 16px 24px;
}
.track-wrapper {
padding: 0 40px;
}
}
</style>
</head>
<body>
<div class="module">
<!-- Loot box carousel -->
<div class="section">
<div class="label">LOOT BOX SPIN</div>
<div class="track-shell">
<div class="selection-window selection-window--loot"></div>
<div class="track-wrapper" id="lootWrapper">
<div cl

Files changed (5) hide show
  1. README.md +8 -5
  2. components/navbar.js +58 -0
  3. index.html +79 -19
  4. script.js +121 -0
  5. style.css +49 -19
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Loot Spinner Supreme
3
- emoji: 🔥
4
- colorFrom: indigo
5
- colorTo: purple
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
  ---
2
+ title: Loot Spinner Supreme 🎰
3
+ colorFrom: green
4
+ colorTo: blue
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://huggingface.co/deepsite).
components/navbar.js ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomNavbar extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ nav {
7
+ background: rgba(17, 24, 39, 0.8);
8
+ backdrop-filter: blur(10px);
9
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1);
10
+ }
11
+
12
+ .nav-link {
13
+ transition: all 0.3s ease;
14
+ }
15
+
16
+ .nav-link:hover {
17
+ color: #f59e0b;
18
+ }
19
+
20
+ .logo {
21
+ text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
22
+ }
23
+ </style>
24
+ <nav class="w-full py-4 px-6">
25
+ <div class="container mx-auto flex justify-between items-center">
26
+ <a href="#" class="text-2xl font-bold text-orange-400 flex items-center logo">
27
+ <i data-feather="package" class="mr-2"></i>
28
+ LootSpin
29
+ </a>
30
+ <div class="hidden md:flex space-x-8">
31
+ <a href="#" class="text-gray-300 nav-link">Home</a>
32
+ <a href="#" class="text-gray-300 nav-link">Prizes</a>
33
+ <a href="#" class="text-gray-300 nav-link">About</a>
34
+ <a href="#" class="text-orange-400 font-medium nav-link">Play Now</a>
35
+ </div>
36
+ <button class="md:hidden text-gray-300">
37
+ <i data-feather="menu"></i>
38
+ </button>
39
+ </div>
40
+ </nav>
41
+ `;
42
+
43
+ // Replace feather icons in shadow DOM
44
+ setTimeout(() => {
45
+ const featherScript = document.createElement('script');
46
+ featherScript.src = 'https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js';
47
+ this.shadowRoot.appendChild(featherScript);
48
+
49
+ featherScript.onload = () => {
50
+ if (window.feather) {
51
+ window.feather.replace({ class: 'feather', 'stroke-width': 2 });
52
+ }
53
+ };
54
+ }, 0);
55
+ }
56
+ }
57
+
58
+ customElements.define('custom-navbar', CustomNavbar);
index.html CHANGED
@@ -1,19 +1,79 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Loot Spinner Supreme</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <script src="https://unpkg.com/feather-icons"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <link rel="stylesheet" href="style.css">
11
+ <script src="components/navbar.js"></script>
12
+ </head>
13
+ <body class="bg-gradient-to-b from-gray-900 to-black min-h-screen">
14
+ <custom-navbar></custom-navbar>
15
+
16
+ <main class="container mx-auto px-4 py-12 max-w-6xl">
17
+ <section class="bg-gray-800/50 backdrop-blur-lg rounded-xl border border-gray-700 p-8 shadow-2xl shadow-orange-500/10 mb-12">
18
+ <h1 class="text-4xl font-bold text-center text-orange-400 mb-6">
19
+ <i data-feather="package" class="inline mr-3"></i>
20
+ Loot Spinner Supreme
21
+ </h1>
22
+ <p class="text-gray-300 text-center max-w-2xl mx-auto mb-8">
23
+ Spin to win amazing prizes with our multiplier system! Every spin gives you a chance to multiply your winnings.
24
+ </p>
25
+
26
+ <!-- Loot Box Section -->
27
+ <div class="mb-12">
28
+ <h2 class="text-xl font-semibold text-orange-300 mb-4 flex items-center">
29
+ <i data-feather="box" class="mr-2"></i> Loot Boxes
30
+ </h2>
31
+ <div id="lootBoxes" class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 gap-6">
32
+ <!-- Loot boxes will be generated by JavaScript -->
33
+ </div>
34
+ </div>
35
+
36
+ <!-- Multiplier Section -->
37
+ <div class="mb-8">
38
+ <h2 class="text-xl font-semibold text-orange-300 mb-4 flex items-center">
39
+ <i data-feather="zap" class="mr-2"></i> Multiplier
40
+ </h2>
41
+ <div id="multiplierSlider" class="flex items-center justify-center space-x-4 mb-6">
42
+ <!-- Multiplier options will be generated by JavaScript -->
43
+ </div>
44
+ </div>
45
+
46
+ <!-- Spin Button -->
47
+ <div class="text-center mt-10">
48
+ <button id="spinButton" class="bg-gradient-to-r from-orange-500 to-amber-600 hover:from-orange-600 hover:to-amber-700 text-white font-bold py-4 px-8 rounded-full text-lg shadow-lg hover:shadow-xl transition-all duration-300 transform hover:scale-105">
49
+ SPIN TO WIN
50
+ <i data-feather="rotate-cw" class="ml-2 animate-spin hidden" id="spinnerIcon"></i>
51
+ </button>
52
+ </div>
53
+ </section>
54
+
55
+ <!-- Results Modal -->
56
+ <div id="resultModal" class="fixed inset-0 bg-black/80 flex items-center justify-center z-50 hidden">
57
+ <div class="bg-gray-800 border border-orange-500/30 rounded-xl p-8 max-w-md w-full mx-4 backdrop-blur-sm">
58
+ <div class="text-center">
59
+ <i data-feather="award" class="text-amber-400 w-16 h-16 mx-auto mb-4"></i>
60
+ <h3 class="text-2xl font-bold text-amber-400 mb-2">You Won!</h3>
61
+ <p class="text-gray-300 mb-1">Base Prize: <span id="basePrize" class="text-white">0</span> SC</p>
62
+ <p class="text-gray-300 mb-1">Multiplier: ×<span id="multiplierValue" class="text-white">1</span></p>
63
+ <div class="border-t border-gray-700 my-4"></div>
64
+ <p class="text-3xl font-bold text-amber-300 mt-4">Total: <span id="totalPrize">0</span> SC</p>
65
+ <button id="closeModal" class="mt-6 bg-orange-500 hover:bg-orange-600 text-white font-medium py-2 px-6 rounded-full transition-colors duration-300">
66
+ Claim Prize
67
+ </button>
68
+ </div>
69
+ </div>
70
+ </div>
71
+ </main>
72
+
73
+ <script src="script.js"></script>
74
+ <script>
75
+ feather.replace();
76
+ </script>
77
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
78
+ </body>
79
+ </html>
script.js ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ document.addEventListener('DOMContentLoaded', function() {
2
+ const lootBoxesContainer = document.getElementById('lootBoxes');
3
+ const multiplierSlider = document.getElementById('multiplierSlider');
4
+ const spinButton = document.getElementById('spinButton');
5
+ const resultModal = document.getElementById('resultModal');
6
+ const closeModal = document.getElementById('closeModal');
7
+ const spinnerIcon = document.getElementById('spinnerIcon');
8
+
9
+ // Loot box data
10
+ const lootBoxes = [
11
+ { value: 10, rarity: 'common', color: 'text-gray-300' },
12
+ { value: 20, rarity: 'uncommon', color: 'text-green-400' },
13
+ { value: 50, rarity: 'rare', color: 'text-blue-400' },
14
+ { value: 100, rarity: 'epic', color: 'text-purple-400' },
15
+ { value: 200, rarity: 'legendary', color: 'text-amber-400' },
16
+ { value: 5, rarity: 'common', color: 'text-gray-300' },
17
+ { value: 15, rarity: 'uncommon', color: 'text-green-400' },
18
+ { value: 30, rarity: 'rare', color: 'text-blue-400' },
19
+ { value: 75, rarity: 'epic', color: 'text-purple-400' },
20
+ { value: 150, rarity: 'legendary', color: 'text-amber-400' }
21
+ ];
22
+
23
+ // Multiplier options
24
+ const multipliers = [1, 1.5, 2, 2.5, 3, 5, 10];
25
+
26
+ // Generate loot boxes
27
+ lootBoxes.forEach((box, index) => {
28
+ const boxElement = document.createElement('div');
29
+ boxElement.className = 'loot-box flex flex-col items-center justify-center';
30
+ boxElement.dataset.value = box.value;
31
+ boxElement.dataset.rarity = box.rarity;
32
+
33
+ boxElement.innerHTML = `
34
+ <i data-feather="package" class="w-10 h-10 ${box.color}"></i>
35
+ <span class="mt-2 font-medium ${box.color}">${box.value} SC</span>
36
+ <span class="text-xs text-gray-400">${box.rarity}</span>
37
+ `;
38
+
39
+ lootBoxesContainer.appendChild(boxElement);
40
+ });
41
+
42
+ // Generate multiplier options
43
+ multipliers.forEach(multiplier => {
44
+ const option = document.createElement('div');
45
+ option.className = 'multiplier-option';
46
+ option.textContent = `×${multiplier}`;
47
+ option.dataset.multiplier = multiplier;
48
+
49
+ option.addEventListener('click', function() {
50
+ document.querySelectorAll('.multiplier-option').forEach(opt => {
51
+ opt.classList.remove('selected');
52
+ });
53
+ this.classList.add('selected');
54
+ });
55
+
56
+ multiplierSlider.appendChild(option);
57
+ });
58
+
59
+ // Set first multiplier as default selected
60
+ multiplierSlider.firstElementChild?.classList.add('selected');
61
+
62
+ // Spin button functionality
63
+ spinButton.addEventListener('click', function() {
64
+ const selectedMultiplier = parseFloat(document.querySelector('.multiplier-option.selected')?.dataset.multiplier || '1');
65
+ const lootBoxElements = document.querySelectorAll('.loot-box');
66
+
67
+ // Show loading state
68
+ spinButton.disabled = true;
69
+ spinnerIcon.classList.remove('hidden');
70
+
71
+ // Clear previous selection
72
+ lootBoxElements.forEach(box => box.classList.remove('active'));
73
+
74
+ // Random selection animation
75
+ let counter = 0;
76
+ const totalIterations = 20;
77
+ const interval = setInterval(() => {
78
+ // Remove active class from all
79
+ lootBoxElements.forEach(box => box.classList.remove('active'));
80
+
81
+ // Select random box
82
+ const randomIndex = Math.floor(Math.random() * lootBoxElements.length);
83
+ lootBoxElements[randomIndex].classList.add('active');
84
+
85
+ counter++;
86
+
87
+ // Slow down at the end
88
+ if (counter > totalIterations * 0.7) {
89
+ clearInterval(interval);
90
+ setTimeout(() => {
91
+ // Final selection
92
+ const finalIndex = Math.floor(Math.random() * lootBoxElements.length);
93
+ lootBoxElements.forEach(box => box.classList.remove('active'));
94
+ lootBoxElements[finalIndex].classList.add('active');
95
+
96
+ // Show result
97
+ const prize = parseFloat(lootBoxElements[finalIndex].dataset.value);
98
+ const total = prize * selectedMultiplier;
99
+
100
+ document.getElementById('basePrize').textContent = prize;
101
+ document.getElementById('multiplierValue').textContent = selectedMultiplier;
102
+ document.getElementById('totalPrize').textContent = total.toFixed(2);
103
+
104
+ resultModal.classList.remove('hidden');
105
+
106
+ // Reset button
107
+ spinButton.disabled = false;
108
+ spinnerIcon.classList.add('hidden');
109
+ }, 300);
110
+ }
111
+ }, 100);
112
+ });
113
+
114
+ // Close modal
115
+ closeModal.addEventListener('click', function() {
116
+ resultModal.classList.add('hidden');
117
+ });
118
+
119
+ // Replace feather icons
120
+ feather.replace();
121
+ });
style.css CHANGED
@@ -1,28 +1,58 @@
1
- body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  }
5
 
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
9
  }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
 
 
 
 
24
  }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
 
 
 
 
 
 
28
  }
 
 
 
 
 
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ /* Custom styles */
6
+ .loot-box {
7
+ @apply bg-gradient-to-b from-gray-800 to-gray-900 border border-gray-700 rounded-xl p-4 shadow-lg cursor-pointer transition-all duration-300;
8
+ perspective: 1000px;
9
+ }
10
+
11
+ .loot-box:hover {
12
+ @apply border-orange-500 shadow-orange-500/20;
13
+ transform: translateY(-4px);
14
+ }
15
+
16
+ .loot-box.active {
17
+ @apply border-amber-400 shadow-amber-400/40;
18
+ animation: pulse 1.5s infinite;
19
+ }
20
+
21
+ .multiplier-option {
22
+ @apply bg-gray-700 text-white rounded-full px-6 py-2 cursor-pointer transition-all duration-200;
23
  }
24
 
25
+ .multiplier-option:hover {
26
+ @apply bg-gray-600;
 
27
  }
28
 
29
+ .multiplier-option.selected {
30
+ @apply bg-gradient-to-r from-amber-500 to-orange-500 text-gray-900 font-bold;
31
+ transform: scale(1.05);
 
 
32
  }
33
 
34
+ @keyframes pulse {
35
+ 0% {
36
+ box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
37
+ }
38
+ 70% {
39
+ box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
40
+ }
41
+ 100% {
42
+ box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
43
+ }
44
  }
45
 
46
+ /* Spin animation */
47
+ @keyframes spin {
48
+ from {
49
+ transform: rotate(0deg);
50
+ }
51
+ to {
52
+ transform: rotate(360deg);
53
+ }
54
  }
55
+
56
+ .animate-spin {
57
+ animation: spin 1s linear infinite;
58
+ }