@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@400;700;900&display=swap');

:root {
    --primary-orange: #ff6b35;
    --secondary-orange: #ff8c42;
    --dark-bg: #0a0a0a;
    --card-bg: #1a1a1a;
    --text-light: #e0e0e0;
}

body {
    font-family: 'Prompt', sans-serif;
    background: var(--dark-bg);
    color: var(--text-light);
    overflow-x: hidden;
    min-height: 100vh;
}

.pagination-btn.active {
    background-color: var(--primary-orange);
    color: black;
    font-weight: bold;
}

.pagination-btn[disabled] {
    pointer-events: none;
    cursor: default;
}

/* Announcement Marquee */
.announcement-bar {
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(5px);
    border-top: 1px solid rgba(255, 107, 53, 0.2);
    border-bottom: 1px solid rgba(255, 107, 53, 0.2);
    color: var(--text-light);
}

.marquee-container {
    overflow: hidden;
    width: 100%;
    position: relative;
}

.marquee-content {
    display: flex; /* Changed from inline-block */
    white-space: nowrap;
    animation: marquee 30s linear infinite;
    /* Removed padding-left: 100%; */
}

.marquee-content:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%); /* Scroll by half the width */
    }
}

/* Sidebar Styles */
@media (max-width: 1023px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        background-color: rgba(26, 26, 26, 0.9);
        backdrop-filter: blur(10px);
        border-right: 1px solid rgba(255, 107, 53, 0.2);
    }
    .sidebar.open {
        transform: translateX(0);
    }
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle at 20% 20%, #ff6b35 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, #ff8c42 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, #ff6b35 0%, transparent 40%),
        linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #2a2a2a 100%);
    animation: pulseGradient 10s ease-in-out infinite alternate;
}

@keyframes pulseGradient {
    0% { 
        opacity: 0.4;
        transform: scale(1);
    }
    100% { 
        opacity: 0.7;
        transform: scale(1.05);
    }
}

.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--primary-orange);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
    box-shadow: 0 0 6px var(--primary-orange);
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) translateX(0px) rotate(0deg); 
        opacity: 0.3;
    }
    25% { 
        transform: translateY(-30px) translateX(15px) rotate(90deg); 
        opacity: 1;
    }
    50% { 
        transform: translateY(-15px) translateX(-10px) rotate(180deg); 
        opacity: 0.7;
    }
    75% { 
        transform: translateY(-40px) translateX(20px) rotate(270deg); 
        opacity: 0.9;
    }
}

.glow-effect {
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.3);
    transition: all 0.3s ease;
}

.glow-effect:hover {
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.6);
}

.product-card {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.9), rgba(42, 42, 42, 0.9));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 107, 53, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-orange);
}

.product-card::before {
    content: '';
    position: absolute;
    top: -35%;
    left: -50%;
    width: 160%;
    height: 160%;
    background: conic-gradient(from 0deg, transparent, rgba(255, 107, 53, 0.1), transparent, rgba(255, 140, 66, 0.1), transparent);
    animation: rotate 10s linear infinite;
    z-index: -1;
}

.slide-container {
    overflow: hidden;
    border-radius: 10px;
}

.slide-track {
    display: flex;
    will-change: transform; /* Keep this for optimization */
}

.neon-text {
    text-shadow: 
        0 0 10px var(--primary-orange), 
        0 0 20px var(--primary-orange),
        0 0 30px var(--primary-orange);
}

.filter-btn {
    background: linear-gradient(45deg, rgba(255, 107, 53, 0.2), rgba(255, 140, 66, 0.2));
    border: 1px solid rgba(255, 107, 53, 0.3);
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: linear-gradient(45deg, var(--primary-orange), var(--secondary-orange));
    color: black;
}

.filter-btn:not(.active):hover {
    background: rgba(255, 107, 53, 0.2);
}

.glass-effect {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 107, 53, 0.1);
    position: relative;
    overflow: hidden;
}

.glass-effect2::before {
    content: '';
    position: absolute;
    top: -40%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255, 107, 53, 0.1), transparent, rgba(255, 140, 66, 0.1), transparent);
    animation: rotate 10s linear infinite;
    z-index: -1;
}

.login-container {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95), rgba(42, 42, 42, 0.95));
    backdrop-filter: blur(25px);
    border: 2px solid rgba(255, 107, 53, 0.3);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255, 107, 53, 0.1), transparent, rgba(255, 140, 66, 0.1), transparent);
    animation: rotate 10s linear infinite;
    z-index: -1;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.input-field {
    background: rgba(26, 26, 26, 0.8);
    border: 2px solid rgba(255, 107, 53, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.input-field:focus {
    border-color: var(--primary-orange);
    box-shadow: 
        0 0 0 3px rgba(255, 107, 53, 0.1),
        0 0 20px rgba(255, 107, 53, 0.3);
    transform: translateY(-2px);
}

.input-field:focus + .input-icon {
    color: var(--primary-orange);
    transform: scale(1.1);
}

.input-icon {
    transition: all 0.3s ease;
}

/* Floating Label styles */
.floating-label {
    position: absolute;
    left: 48px; /* input-icon is left-4 (16px), input text starts at px-12 (48px) */
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af; /* gray-400 */
    pointer-events: none;
    transition: all 0.2s ease-out;
    font-size: 1rem; /* Default size */
    background-color: transparent; /* Ensure no background interferes */
    padding: 0 4px; /* Small padding for background when active */
    z-index: 1; /* Above input field */
}

.input-field:focus + .floating-label,
.input-field:not(:placeholder-shown) + .floating-label {
    top: -10px; /* Adjust based on input padding, needs to be above the input field */
    transform: translateY(-50%) scale(0.85); /* Shrink and move up */
    font-size: 0.875rem; /* Smaller font size */
    color: var(--primary-orange); /* Change color on focus/filled */
    background-color: var(--card-bg); /* Match input background for "floating" effect */
    left: 44px; /* Adjust left position slightly when floating */
    padding: 0 4px; /* Add padding to create a background "cutout" effect */
}

/* Prevent Autofill Background Color Change */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #1a1a1a inset !important;
    -webkit-text-fill-color: var(--text-light) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-orange), var(--secondary-orange));
    box-shadow: 
        0 4px 15px rgba(255, 107, 53, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    color: black;
    font-weight: bold;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 6px 20px rgba(255, 107, 53, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 107, 53, 0.1);
    border: 2px solid rgba(255, 107, 53, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    color: var(--text-light);
}

.btn-secondary:hover {
    background: rgba(255, 107, 53, 0.2);
    border-color: var(--primary-orange);
    transform: translateY(-2px);
}

.social-btn {
    background: rgba(26, 26, 26, 0.9);
    border: 1px solid rgba(255, 107, 53, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.social-btn:hover {
    border-color: var(--primary-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.2);
}

.tab-btn {
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.2);
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: linear-gradient(45deg, var(--primary-orange), var(--secondary-orange));
    color: black;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.4);
}

.tab-btn:not(.active):hover {
    background: rgba(255, 107, 53, 0.2);
}

.detail-tab-btn {
    background: rgba(255, 107, 53, 0.1);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.detail-tab-btn.active {
    background: rgba(255, 107, 53, 0.2);
    border-bottom-color: var(--primary-orange);
    color: var(--primary-orange);
}

.detail-tab-btn:not(.active):hover {
    background: rgba(255, 107, 53, 0.15);
}

.form-container {
    min-height: 400px;
}

.password-strength {
    height: 4px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-weak { background: #ff4444; }
.strength-medium { background: #ffaa00; }
.strength-strong { background: #00ff00; }

.floating-icon {
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

@media (max-width: 768px) {
    .particle { display: none; }
    .login-container {
        margin: 1rem;
    }
}

.checkbox-custom {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 107, 53, 0.5);
    border-radius: 3px;
    background: rgba(26, 26, 26, 0.8);
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkbox-custom:checked {
    background: var(--primary-orange);
    border-color: var(--primary-orange);
}

.checkbox-custom:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: black;
    font-weight: bold;
    font-size: 12px;
}

.loading-spinner {
    border: 2px solid rgba(255, 107, 53, 0.2);
    border-left: 2px solid var(--primary-orange);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.profile-tab-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 600;
    color: var(--text-light);
}
.profile-tab-btn:hover {
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary-orange);
}
.profile-tab-btn.active {
    background: var(--primary-orange);
    color: black;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}
.profile-tab-btn i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}
.profile-tab-content {
    background: rgba(26, 26, 26, 0.85);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 107, 53, 0.2);
    padding: 2rem;
    border-radius: 0.5rem;
    position: relative;
    overflow: hidden;
}

.profile-tab-content::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255, 107, 53, 0.1), transparent, rgba(255, 140, 66, 0.1), transparent);
    animation: rotate 10s linear infinite;
    z-index: -1;
}

.info-field {
    background: rgba(10, 10, 10, 0.5);
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    border: 1px solid rgba(255, 107, 53, 0.2);
}
.swal2-input, .swal2-file {
    background: #0a0a0a !important;
    color: #e0e0e0 !important;
    border: 1px solid var(--primary-orange) !important;
}

/* สไตล์ dropdown ให้โทนเดียวกับ filter-btn */
#filterDropdown {
    background: rgb(179, 65, 24);
    border: 1px solid rgb(255, 107, 53);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none; /* ซ่อน default arrow ของ browser */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='16' height='16' fill='black' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6l4 4 4-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
}

/* hover */
#filterDropdown:hover {
    background: linear-gradient(45deg, rgba(238, 70, 9, 0.788), rgba(255, 140, 66, 0.3));
}

/* focus */
#filterDropdown:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 5px rgba(255, 107, 53, 0.6);
}

/* option ด้านใน */
#filterDropdown option {
    background: rgba(212, 103, 31, 0.5);
    color: #000000;
    font-weight: 500;
}

/* active (เมื่อเลือกค่าแล้ว) */
#filterDropdown:active {
    background: linear-gradient(45deg, var(--primary-orange), var(--secondary-orange));
    color: black;
}

.neon-text-gold {
    text-shadow:
        0 0 10px #FFD700,
        0 0 20px #FFD700,
        0 0 30px #FFD700;
}

.neon-text-silver {
    text-shadow:
        0 0 10px #C0C0C0,
        0 0 20px #C0C0C0,
        0 0 30px #C0C0C0;
}

.neon-text-bronze {
    text-shadow:
        0 0 10px #CD7F32,
        0 0 20px #CD7F32,
        0 0 30px #CD7F32;
}

/* Product Detail Page Styles */
.product-detail-container {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95), rgba(42, 42, 42, 0.95));
    backdrop-filter: blur(25px);
    border: 2px solid rgba(255, 107, 53, 0.3);
}

.main-product-image {
    transition: transform 0.3s ease-in-out;
}

.thumbnail-image {
    transition: all 0.2s ease-in-out;
    border: 2px solid transparent;
}

.thumbnail-image:hover {
    transform: scale(1.05);
    border-color: rgba(255, 107, 53, 0.5);
}

.video-embed-container {
    position: relative;
    width: 100%;
    /* padding-bottom is set inline for 16:9 aspect ratio */
}

.video-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.tag {
    display: inline-block;
    background-color: #374151; /* gray-700 */
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 14px;
    transition: background-color 0.2s;
    text-decoration: none;
}
.tag:hover {
    background-color: #4B5563; /* gray-600 */
}
.tag.active {
    background-color: #F97316; /* orange-500 */
    color: black;
    font-weight: bold;
}

/* Image Modal Enhancements */
#imageModal {
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

#modalImage {
    box-shadow: 0 0 40px rgba(255, 107, 53, 0.5);
}

/* Corner Ribbon */
.corner-ribbon-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    overflow: hidden;
    z-index: 10;
}

.corner-ribbon {
    position: absolute;
    top: 25px;
    right: -35px;
    transform: rotate(45deg);
    width: 100%;
    text-align: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 5px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.corner-ribbon.corner-ribbon-red { background-color: #ef4444; } /* red-500 */
.corner-ribbon.corner-ribbon-green { background-color: #22c55e; } /* green-500 */
.corner-ribbon.corner-ribbon-blue { background-color: #3b82f6; } /* blue-500 */

/* Left Corner Ribbon */
.corner-ribbon-left-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 150px;
    height: 150px;
    overflow: hidden;
    z-index: 10;
}

.corner-ribbon-left {
    position: absolute;
    top: 25px;
    left: -35px;
    transform: rotate(-45deg);
    width: 100%;
    text-align: center;
    background-color: #f59e0b; /* amber-500 */
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 5px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}



/* Left Corner Ribbon Item Code */
.corner-ribbon-left-wrapper-item-code {
    position: absolute;
    top: 0;
    left: 0;
    width: 150px;
    height: 150px;
    overflow: hidden;
    z-index: 10;
}

.corner-ribbon-left-item-code {
    position: absolute;
    top: 25px;
    left: -35px;
    transform: rotate(-45deg);
    width: 100%;
    text-align: center;
    background-color: #be0bf5; /* amber-500 */
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 5px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Preloader Styles */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0a0a0a; /* Dark background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensure it's on top of everything */
    transition: opacity 0.5s ease-out;
}

.preloader.hidden {
    opacity: 0;
    pointer-events: none; /* Allow clicks through once hidden */
}

.preloader-content {
    text-align: center;
    color: var(--primary-orange); /* Orange color */
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 107, 53, 0.3); /* Using rgba for primary-orange */
    border-top-color: var(--primary-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

.loading-text {
    font-family: 'Share Tech Mono', monospace; /* A futuristic font if available, otherwise a sans-serif fallback */
    font-size: 1.2em;
    letter-spacing: 3px;
    text-shadow: 0 0 5px var(--primary-orange), 0 0 10px var(--primary-orange);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounceScale {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.9; }
  100% { transform: scale(1); opacity: 1; }
}
.animate-bounce-scale {
  animation: bounceScale 0.4s ease;
}
    .minigame-container {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }

    /* --- Minigame Reel Styles --- */
    .minigame-reel-container {
      background: #111827; /* gray-900 */
      height: 140px; /* Slightly taller to accommodate item borders/shadows */
      display: flex;
      align-items: center; /* Vertically center the reel */
    }

    .minigame-reel-container .reel {
      transition: left 5s cubic-bezier(0.23, 1, 0.32, 1);
      padding: 0 10px; /* Add some padding to the reel itself */
    }

    .minigame-reel-container .reel-item {
      width: 128px; /* h-32 */
      height: 128px; /* h-32 */
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      flex-shrink: 0;
      font-size: 1.5rem;
      font-weight: bold;
      color: white;
      border: 2px solid transparent; /* Initial transparent border */
      border-radius: 8px;
      margin: 0 4px; /* Space between items */
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
      transition: all 0.2s ease-in-out;
      position: relative;
      overflow: hidden;
    }

    .minigame-reel-container .reel-item::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(to bottom, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 100%);
      z-index: 1;
      pointer-events: none;
    }

    .minigame-reel-container .reel-item span {
      z-index: 2;
      position: relative;
    }

/* Common - Gray */
.item-common {
    background: linear-gradient(145deg, #6b7280, #374151); /* gray-500 → gray-800 */
    border-color: #6b7280;
    box-shadow: 0 4px 6px rgba(107,114,128,0.4);
    color: #f3f4f6;
}

/* Mil-Spec - Blue */
.item-milspec {
    background: linear-gradient(145deg, #3b82f6, #1e3a8a); /* blue-500 → blue-900 */
    border-color: #3b82f6;
    box-shadow: 0 4px 8px rgba(59,130,246,0.6);
    color: #dbeafe;
}

/* Restricted - Purple */
.item-restricted {
    background: linear-gradient(145deg, #8b5cf6, #4c1d95); /* purple-500 → purple-900 */
    border-color: #8b5cf6;
    box-shadow: 0 4px 10px rgba(139,92,246,0.7);
    color: #ede9fe;
}

/* Classified - Pink / Magenta */
.item-classified {
    background: linear-gradient(145deg, #ec4899, #9d174d); /* pink-500 → pink-900 */
    border-color: #ec4899;
    box-shadow: 0 5px 12px rgba(236,72,153,0.6);
    color: #fdf2f8;
}

/* Covert - Red */
.item-covert {
    background: linear-gradient(145deg, #ef4444, #7f1d1d); /* red-500 → red-900 */
    border-color: #ef4444;
    box-shadow: 0 6px 14px rgba(239,68,68,0.7);
    color: #fee2e2;
}

/* Contraband - Gold */
.item-contraband {
    background: linear-gradient(145deg, #f59e0b, #92400e); /* amber-500 → amber-900 */
    border-color: #f59e0b;
    box-shadow: 0 6px 14px rgba(245,158,11,0.8);
    color: #fff8e1;
}

/* Rare Special - Cyan / Teal */
.item-rare_special {
    /* Animated Rainbow Gradient - Seamless Loop */
    background: linear-gradient(145deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8f00ff, #ff0000);
    background-size: 400% 400%;
    border-color: transparent;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    animation: rainbow-bg-move 8s linear infinite, rainbow-glow 5s ease-in-out infinite;
}

@keyframes rainbow-bg-move {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes rainbow-glow {
    0%, 100% { box-shadow: 0 0 20px 5px rgba(255, 0, 0, 0.7); }      /* Red */
    16% { box-shadow: 0 0 25px 8px rgba(255, 127, 0, 0.8); }   /* Orange */
    33% { box-shadow: 0 0 20px 5px rgba(255, 255, 0, 0.7); }   /* Yellow */
    50% { box-shadow: 0 0 25px 8px rgba(0, 255, 0, 0.8); }      /* Green */
    66% { box-shadow: 0 0 20px 5px rgba(0, 0, 255, 0.7); }      /* Blue */
    83% { box-shadow: 0 0 25px 8px rgba(75, 0, 130, 0.8); }     /* Indigo */
}


    /* Pointer styling */
    .minigame-reel-container > div:last-child { /* This targets the orange pointer div */
        width: 4px !important; /* Make it a thin line */
        height: 100% !important; /* Full height */
        background-color: #f97316 !important; /* Orange color */
        box-shadow: 0 0 15px #f97316, 0 0 30px #f97316; /* Stronger glow */
        z-index: 10; /* Ensure it's above the reel */
        border-radius: 2px;
    }    .random-box-card {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.9), rgba(42, 42, 42, 0.9));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 107, 53, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.random-box-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-orange);
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.6);
}
.random-box-card {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 0.75rem; /* Tailwind's rounded-lg */
    padding: 2rem; /* Tailwind's p-8 */
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.random-box-card::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255, 107, 53, 0.05), transparent, rgba(255, 140, 66, 0.05), transparent);
    animation: rotate 10s linear infinite;
    z-index: -1;
}
@keyframes zoomInOut {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}
.animate-zoom {
  animation: zoomInOut 1.5s infinite ease-in-out;
}

.game-title {
  display: inline-block;
  padding: 22px 18px;
  border-radius: 12px;
  background: linear-gradient(145deg, #111, #222); /* พื้นหลังด้านใน */
  color: #fff;
  position: relative;
  font-weight: bold;
  text-transform: uppercase;
  overflow: hidden;
}

.game-title::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 4px; /* ความหนาของกรอบ */
  border-radius: 12px;
  background: linear-gradient(
    90deg,
    #00f7ff,
    #ff00ff,
    #00ff88,
    #ffff00,
    #00f7ff
  );
  background-size: 300% 300%;
  animation: borderMove 6s linear infinite;
  -webkit-mask: 
    linear-gradient(#000 0 0) content-box, 
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude; /* เจาะตรงกลาง */
}

@keyframes borderMove {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.spin-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 1.25rem;
  font-weight: bold;
  color: #e60808;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  text-transform: uppercase;
  z-index: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ไฟวิ่งทั่วปุ่ม */
.spin-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    270deg,
    #00f7ff,
    #ff00ff,
    #ffff00,
    #00ff88,
    #00f7ff
  );
  background-size: 400% 400%;
  border-radius: 12px;
  filter: blur(8px);
  animation: moveGradient 4s linear infinite;
  z-index: -1;
}

/* ปุ่มด้านในทึบเล็กน้อยให้ข้อความอ่านง่าย */
.spin-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  border-radius: 12px;
  z-index: 0;
}

/* ไฟวิ่ง animation */
@keyframes moveGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Hover effect */
.spin-button:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px #00f7ff, 0 0 40px #ff00ff inset;
}

/* ไอคอนเด้ง */
.spin-button i {
  margin-right: 8px;
  animation: bounce 1s infinite alternate;
}

@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-5px); }
}

.header-glass-effect {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 107, 53, 0.1);
    position: relative;
}

/* ไฟวิ่งขอบซ้ายของ container */
.game-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;       /* ครอบสูงเท่ากับ container */
  width: 4px;         /* ความหนาของเส้นไฟ */
  border-radius: 2px; /* มุมโค้งเล็กน้อย */
  background: linear-gradient(
    180deg,           /* ให้ไฟไล่สีแนวตั้ง */
    #00f7ff,
    #ff00ff,
    #00ff88,
    #ffff00,
    #00f7ff
  );
  background-size: 300% 300%;
  animation: borderMoveLeft 3s linear infinite;
}

/* Animation ไฟวิ่งแนวตั้ง */
@keyframes borderMoveLeft {
  0%   { background-position: 0% 0%; }
  50%  { background-position: 0% 100%; }
  100% { background-position: 0% 0%; }
}

/* --- Random Box Animation & Modal --- */

#animation-overlay {
    backdrop-filter: blur(10px);
}

.randombox-reel-container .reel {
    transition: left 5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.randombox-reel-container .reel-item {
    width: 128px; /* h-32 */
    height: 128px; /* h-32 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    border: 2px solid #4a5568; /* gray-700 */
    border-radius: 8px;
    margin: 0 8px; /* Space between items */
    background: linear-gradient(145deg, #4a5568, #374151); /* gray-600 to gray-700 */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease-in-out;
    opacity: 0.6;
}

.randombox-reel-container .reel-item.is-center {
    transform: scale(1.2);
    opacity: 1;
    border-color: #f97316; /* orange-500 */
    box-shadow: 0 0 25px #f97316;
}

@keyframes button-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(249, 115, 22, 0.5);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(249, 115, 22, 0.8);
    }
}

/* --- New Gift Box Animation Styles --- */
#animation-overlay {
    backdrop-filter: blur(10px);
    transition: opacity 0.3s ease-out;
}

#giftbox-container.shake {
    animation: shake 0.8s cubic-bezier(.36,.07,.19,.97) both;
}

#giftbox-base {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 70%;
    background: linear-gradient(145deg, #c0392b, #e74c3c);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3), inset 0 -5px 10px rgba(0,0,0,0.2);
}

/* Ribbon on the base */
#giftbox-base::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20%;
    height: 100%;
    background: #f1c40f;
}

#giftbox-lid {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 110%;
    height: 35%;
    background: linear-gradient(145deg, #e74c3c, #c0392b);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    transform-origin: bottom center;
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
    z-index: 10;
}

/* Ribbon on the lid */
#giftbox-lid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 18.18%; /* 20% of 110% width */
    height: 100%;
    background: #f1c40f;
}

/* Bow on top */
#giftbox-lid::after {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 50%;
    background: #f1c40f;
    border-radius: 50%;
    box-shadow: -15px 10px 0 #f39c12, 15px 10px 0 #f39c12;
}

#giftbox-lid.open {
    transform: translateY(-180%) rotate(30deg) scale(0.8);
    opacity: 0;
}

#light-burst {
    background: radial-gradient(circle, rgba(255, 220, 150, 0.8) 0%, rgba(255, 180, 50, 0) 70%);
    transform: scale(0);
    opacity: 0;
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

#light-burst.active {
    transform: scale(2.5);
    opacity: 1;
}

#item-reveal-container .revealed-item {
    animation: reveal-item 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes shake {
  10%, 90% { transform: translateX(-1px) rotate(-1deg); }
  20%, 80% { transform: translateX(2px) rotate(2deg); }
  30%, 50%, 70% { transform: translateX(-4px) rotate(-2deg); }
  40%, 60% { transform: translateX(4px) rotate(2deg); }
}

@keyframes reveal-item {
    0% {
        transform: translateY(50px) scale(0.5);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.text-shadow-lg {
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

@keyframes emerge-and-glow {
    0% {
        transform: translateY(50px) scale(0.8);
        opacity: 0;
        box-shadow: 0 0 10px rgba(255, 220, 150, 0);
    }
    60% {
        transform: translateY(-10px) scale(1.05);
        opacity: 1;
        box-shadow: 0 0 60px 30px rgba(255, 220, 150, 0.5);
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
        box-shadow: 0 0 30px rgba(255, 180, 50, 0.2);
    }
}

#result-modal-content.show {
    animation: emerge-and-glow 0.7s cubic-bezier(0.215, 0.610, 0.355, 1.000) forwards;
}

.modal-bg-light {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255, 165, 0, 0.15) 0%, rgba(255, 165, 0, 0) 60%);
    z-index: -1;
}

.rarity-Common { color: #ffffff; }
.rarity-Uncommon { color: #1eff00; }
.rarity-Rare { color: #0070dd; }
.rarity-Legendary { color: #a335ee; }

@keyframes rarity-glow-common {
    0%, 100% { box-shadow: 0 0 15px 5px rgba(255, 255, 255, 0.2); }
    50% { box-shadow: 0 0 25px 10px rgba(255, 255, 255, 0.4); }
}

@keyframes rarity-glow-uncommon {
    0%, 100% { box-shadow: 0 0 20px 8px rgba(30, 255, 0, 0.3); }
    50% { box-shadow: 0 0 30px 15px rgba(30, 255, 0, 0.5); }
}

@keyframes rarity-glow-rare {
    0%, 100% { box-shadow: 0 0 25px 10px rgba(0, 112, 221, 0.4); }
    50% { box-shadow: 0 0 40px 20px rgba(0, 112, 221, 0.6); }
}

@keyframes rarity-glow-legendary {
    0%, 100% { box-shadow: 0 0 30px 12px rgba(163, 53, 238, 0.5); }
    50% { box-shadow: 0 0 50px 25px rgba(163, 53, 238, 0.7); }
}

#result-modal-content.glow-common { animation: rarity-glow-common 2s infinite ease-in-out; }
#result-modal-content.glow-uncommon { animation: rarity-glow-uncommon 2s infinite ease-in-out; }
#result-modal-content.glow-rare { animation: rarity-glow-rare 2s infinite ease-in-out; }
#result-modal-content.glow-legendary { animation: rarity-glow-legendary 2s infinite ease-in-out; }

.grayscale {
    filter: grayscale(100%);
}

.out-of-stock-text {
    color: rgba(255, 0, 0, 0.8);
    font-size: 2rem;
    font-weight: bold;
    transform: rotate(-25deg);
    text-shadow: 2px 2px 5px rgba(0,0,0,0.7);
    pointer-events: none;
    user-select: none;
}
#snapshot-box.scale-0 { transform: scale(0); opacity: 0; transition: transform 0.3s ease-out, opacity 0.3s ease-out; }
#snapshot-box.scale-100 { transform: scale(1); opacity: 1; transition: transform 0.3s ease-out, opacity 0.3s ease-out; }

.copy-btn {
  background: linear-gradient(145deg, #22c55e, #16a34a); /* เขียวแบบ RPG */
  color: #fff;
  font-weight: bold;
  border: 2px solid #15803d;
  box-shadow: 0 0 8px #22c55e, 0 0 16px #16a34a;
  transition: all 0.2s ease-in-out;
}

.copy-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px #22c55e, 0 0 24px #16a34a, 0 0 36px #a7f3d0;
}

.copy-btn:active {
  transform: scale(0.95);
  box-shadow: 0 0 6px #22c55e, 0 0 12px #16a34a;
}

.snapshot-close-btn {
  position: absolute;
  top: 0.75rem;  /* 12px */
  right: 0.75rem;
  font-size: 1.75rem; /* ขนาดใหญ่ขึ้น */
  font-weight: bold;
  color: #f97316; /* ส้มสด */
  background: rgba(0, 0, 0, 0);
  border: 2px solid #f97316;
  border-radius: 50%;
  width: 2.5rem;  /* 40px */
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px #f97316, 0 0 16px #fdba74; /* glow ส้ม */
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.snapshot-close-btn:hover {
  transform: scale(1.2);
  box-shadow: 0 0 12px #f97316, 0 0 24px #fdba74, 0 0 36px #ffe0b2;
}

.glow-animated {
  color: #f97316; /* สีหลัก */
  text-shadow:
    0 0 2px #f97316,
    0 0 4px #fdba74,
    0 0 6px #f97316,
    0 0 8px #ffedd5;
  position: relative;
  transition: all 0.2s ease-in-out;
  animation: aura-glow 2s linear infinite;
}

@keyframes aura-glow {
  0% {
    text-shadow:
      0 0 2px #f97316,
      0 0 4px #fdba74,
      0 0 6px #f97316,
      0 0 8px #ffedd5;
  }
  25% {
    text-shadow:
      0 0 3px #fdba74,
      0 0 5px #f97316,
      0 0 7px #ffedd5,
      0 0 10px #fdba74;
  }
  50% {
    text-shadow:
      0 0 4px #ffedd5,
      0 0 6px #fdba74,
      0 0 8px #f97316,
      0 0 12px #ffedd5;
  }
  75% {
    text-shadow:
      0 0 3px #fdba74,
      0 0 5px #ffedd5,
      0 0 7px #f97316,
      0 0 10px #fdba74;
  }
  100% {
    text-shadow:
      0 0 2px #f97316,
      0 0 4px #fdba74,
      0 0 6px #f97316,
      0 0 8px #ffedd5;
  }
}

.glow-border {
  font-weight: bold;
  color: #fff;
  background: linear-gradient(90deg, #ff9d0a, #ffd27f, #ff9d0a);
  background-size: 200% 100%; /* ให้ gradient กว้างพอสำหรับเลื่อน */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; /* ทำให้เห็น background แทนตัวอักษร */
  animation: glow-border-move 2s linear infinite;
}

@keyframes glow-border-move {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 200% 0;
  }
}


.user-detail-row .col-6 {
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
}

/* --- Custom Scrollbar Styling --- */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg); /* #0a0a0a */
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary-orange); /* #ff6b35 */
    border-radius: 10px;
    border: 3px solid var(--dark-bg); /* Creates padding effect */
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--secondary-orange); /* #ff8c42 */
}

@media (min-width: 576px) {
    .user-detail-row .col-sm-4 {
        text-align: right;
        font-weight: 600; /* เน้น label */
    }
}