casino/frontend/src/app/feature/lootboxes/lootbox-opening/lootbox-opening.component.css

242 lines
4.6 KiB
CSS

body {
background: linear-gradient(to bottom, #181c2a, #232c43);
}
/* Color classes */
.text-yellow-400 {
color: #facc15;
}
.text-purple-400 {
color: #a78bfa;
}
.text-blue-400 {
color: #60a5fa;
}
.border-yellow-400 {
border-color: #facc15;
}
.border-purple-400 {
border-color: #a78bfa;
}
.border-blue-400 {
border-color: #60a5fa;
}
/* Loader animation */
.loader {
border: 4px solid rgba(255, 255, 255, 0.2);
border-radius: 50%;
border-top: 4px solid #facc15;
width: 40px;
height: 40px;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
/* Open button styling */
.open-btn {
background: linear-gradient(90deg, #4338ca 0%, #8b5cf6 100%);
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
transition: all 0.2s ease;
}
.open-btn:hover {
background: linear-gradient(90deg, #4f46e5 0%, #a78bfa 100%);
transform: translateY(-2px);
box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}
/* CSGO-style case opening display */
.case-container {
position: relative;
width: 100%;
background: rgba(26, 31, 48, 0.6);
border-radius: 8px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
overflow: hidden;
margin-bottom: 20px;
display: flex;
justify-content: center;
}
.case-indicator {
position: absolute;
top: 50%;
left: 50%; /* Back to center - we'll adjust the animation instead */
transform: translate(-50%, -50%); /* Center precisely */
width: 6px;
height: 100%;
background: #facc15;
box-shadow:
0 0 10px #facc15,
0 0 15px rgba(255, 255, 255, 0.5);
z-index: 3;
animation: indicator-pulse 1.5s ease-in-out 10s infinite alternate;
}
@keyframes indicator-pulse {
0% {
opacity: 0.6;
box-shadow:
0 0 10px #facc15,
0 0 15px rgba(255, 255, 255, 0.3);
}
100% {
opacity: 1;
box-shadow:
0 0 15px #facc15,
0 0 20px rgba(255, 255, 255, 0.7);
}
}
.case-items-container {
position: relative;
z-index: 1;
padding: 10px 5px;
margin: 0 auto;
width: 100%;
height: 150px; /* Fixed height for the horizontal row */
overflow: hidden; /* Hide scrollbar */
display: flex;
justify-content: center; /* Center the items container */
align-items: center;
}
.case-items {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
gap: 8px;
padding: 5px 0px; /* Remove horizontal padding */
height: 100%;
width: 100%;
animation: slide-in 10s cubic-bezier(0.05, 0.82, 0.17, 1) forwards;
transform: translateX(3000%); /* Extremely far initial position for 200 items */
position: relative; /* Ensure positioning context */
}
@keyframes slide-in {
0% {
transform: translateX(2000%);
}
90% {
transform: translateX(-16%); /* Single overshoot for dramatic effect */
}
100% {
transform: translateX(-8%); /* Centered position */
}
}
.case-item {
transition: all 0.2s ease;
padding: 2px;
animation: item-flash 0.3s ease-out forwards;
animation-play-state: paused;
}
@keyframes item-flash {
0% {
filter: brightness(1);
}
50% {
filter: brightness(1.8);
}
100% {
filter: brightness(1.2);
}
}
.case-item-inner {
background: #232c43;
border: 2px solid #2d3748;
border-radius: 8px;
padding: 10px 5px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 65px;
height: 100%;
}
.case-item-won {
z-index: 2;
animation: highlight-winner 1s ease-out 10s forwards;
}
.case-item-won .case-item-inner {
box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
background: linear-gradient(to right, #232c43, #2a3354, #232c43);
border: 2px solid #facc15; /* Gold border for winning item */
}
/* Specific ID for the winning item to ensure it's visible */
#winning-item {
z-index: 5; /* Higher than indicator */
}
@keyframes highlight-winner {
0% {
transform: scale(1);
filter: brightness(1);
}
10% {
transform: scale(1.3);
filter: brightness(2);
}
20% {
transform: scale(1.2);
filter: brightness(1.8);
}
30% {
transform: scale(1.25);
filter: brightness(2);
}
40% {
transform: scale(1.2);
filter: brightness(1.8);
}
50% {
transform: scale(1.25);
filter: brightness(2);
}
60% {
transform: scale(1.2);
filter: brightness(1.8);
}
70% {
transform: scale(1.25);
filter: brightness(2);
}
80% {
transform: scale(1.2);
filter: brightness(1.8);
}
90% {
transform: scale(1.25);
filter: brightness(2);
}
100% {
transform: scale(1.2);
filter: brightness(1.5);
}
}
.amount {
font-size: 1rem;
font-weight: bold;
margin-bottom: 4px;
}
.rarity {
font-size: 0.75rem;
opacity: 0.7;
}