/* Lucky Draw & Gift Allocation Portal Styles */

:root {
    --bg-primary: #0b132b;
    --bg-secondary: #1c2541;
    --bg-card: rgba(28, 37, 65, 0.75);
    --gold-primary: #f59e0b;
    --gold-light: #fef3c7;
    --gold-dark: #b45309;
    --emerald-primary: #10b981;
    --emerald-glow: rgba(16, 185, 129, 0.35);
    --gold-glow: rgba(245, 158, 11, 0.4);
    --border-subtle: rgba(255, 255, 255, 0.1);
}

body {
    background-color: #0b132b;
    background-image: 
        radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(245, 158, 11, 0.12) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(30, 58, 138, 0.25) 0px, transparent 60%);
    background-attachment: fixed;
    color: #f1f5f9;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
}

/* Glassmorphism Containers & Interactive Hover Effects */
.glass-panel {
    background: rgba(28, 37, 65, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
}

.glass-panel:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.55), 0 0 24px rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.35);
}

.glass-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-4px) scale(1.015);
    box-shadow: 0 16px 32px -4px rgba(0, 0, 0, 0.6), 0 0 20px rgba(59, 130, 246, 0.22);
    border-color: rgba(255, 255, 255, 0.22);
}

.glass-input {
    background: rgba(11, 19, 43, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

.glass-input:focus {
    border-color: var(--gold-primary) !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2) !important;
}

/* Gold Gradient & Text */
.gold-gradient-text {
    background: linear-gradient(135deg, #fef08a 0%, #f59e0b 50%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.emerald-gradient-text {
    background: linear-gradient(135deg, #a7f3d0 0%, #10b981 50%, #047857 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gold-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 20px var(--gold-glow);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.gold-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 6px 25px rgba(245, 158, 11, 0.6);
    transform: translateY(-2px);
}

.gold-btn:active:not(:disabled) {
    transform: translateY(0);
}

.emerald-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 20px var(--emerald-glow);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.emerald-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.6);
    transform: translateY(-2px);
}

/* Slot Machine Reel Styling */
.slot-machine-frame {
    position: relative;
    background: radial-gradient(circle at 50% 50%, #1c2541 0%, #0b132b 100%);
    border: 3px solid rgba(245, 158, 11, 0.5);
    border-radius: 1.5rem;
    box-shadow: 
        0 0 35px rgba(245, 158, 11, 0.25),
        inset 0 0 30px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.slot-machine-frame:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 0 48px rgba(245, 158, 11, 0.4),
        0 18px 40px -8px rgba(0, 0, 0, 0.7),
        inset 0 0 35px rgba(0, 0, 0, 0.9);
    border-color: rgba(245, 158, 11, 0.75);
}

.slot-machine-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 35%;
    background: linear-gradient(to bottom, rgba(11, 19, 43, 0.95), transparent);
    z-index: 10;
    pointer-events: none;
}

.slot-machine-frame::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 35%;
    background: linear-gradient(to top, rgba(11, 19, 43, 0.95), transparent);
    z-index: 10;
    pointer-events: none;
}

.slot-target-beam {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    height: 110px;
    border-top: 2px solid rgba(245, 158, 11, 0.8);
    border-bottom: 2px solid rgba(245, 158, 11, 0.8);
    background: rgba(245, 158, 11, 0.08);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
    z-index: 5;
    pointer-events: none;
}

.reel-spinning {
    animation: reelPulse 0.3s infinite alternate;
}

@keyframes reelPulse {
    0% { transform: scale(0.995); filter: blur(0.5px); }
    100% { transform: scale(1.005); filter: blur(0px); }
}

.reel-winner-lock {
    animation: winnerFlash 0.8s ease-out;
}

@keyframes winnerFlash {
    0% { transform: scale(0.95); box-shadow: 0 0 60px rgba(245, 158, 11, 0.9); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); box-shadow: 0 0 30px rgba(245, 158, 11, 0.4); }
}

/* Winner Slight Zoom Keyframe Animation on Reel Container */
.reel-winner-zoom {
    animation: winnerSlightZoom 3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes winnerSlightZoom {
    0% {
        transform: scale(0.92);
        filter: drop-shadow(0 0 0px transparent);
    }
    18% {
        transform: scale(1.08);
        filter: drop-shadow(0 0 35px rgba(245, 158, 11, 0.85));
    }
    35% {
        transform: scale(1.04);
        filter: drop-shadow(0 0 25px rgba(245, 158, 11, 0.6));
    }
    100% {
        transform: scale(1.04);
        filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.5));
    }
}

/* Modal Customer Code & Customer Name Zoom Animations */
.modal-zoom-code {
    display: inline-block;
    animation: modalCodeZoom 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.modal-zoom-name {
    display: inline-block;
    animation: modalNameZoom 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes modalCodeZoom {
    0% {
        opacity: 0;
        transform: scale(0.5);
        filter: blur(4px);
    }
    60% {
        opacity: 1;
        transform: scale(1.22);
        filter: drop-shadow(0 0 15px rgba(245, 158, 11, 0.9)) blur(0px);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.4));
    }
}

@keyframes modalNameZoom {
    0% {
        opacity: 0;
        transform: scale(0.5);
        filter: blur(4px);
    }
    65% {
        opacity: 1;
        transform: scale(1.18);
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8)) blur(0px);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.3));
    }
}

/* Winner Card Glow Pulse */
.winner-card {
    border: 2px solid rgba(245, 158, 11, 0.6);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    box-shadow: 0 10px 30px -5px rgba(245, 158, 11, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.winner-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px -5px rgba(245, 158, 11, 0.4);
    border-color: rgba(245, 158, 11, 0.9);
}

/* Modal Animations */
.modal-backdrop {
    background: rgba(7, 12, 27, 0.85);
    backdrop-filter: blur(8px);
}

@keyframes scaleUp {
    0% { opacity: 0; transform: scale(0.9) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.animate-scale-up {
    animation: scaleUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(11, 19, 43, 0.5);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 158, 11, 0.6);
}

/* Badge Styles */
.badge-gold {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}

.badge-emerald {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.badge-blue {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}

/* Print Styling for Certificates and Winner Sheets */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }

    .no-print, nav, .slot-machine-frame, .actions-bar, header, button {
        display: none !important;
    }

    .print-only {
        display: block !important;
    }

    .glass-panel, .glass-card {
        background: none !important;
        border: 1px solid #cccccc !important;
        box-shadow: none !important;
        color: #000000 !important;
    }

    table {
        color: #000000 !important;
        border-collapse: collapse;
        width: 100%;
    }

    th, td {
        border: 1px solid #dddddd !important;
        color: #000000 !important;
        padding: 8px !important;
    }

    th {
        background-color: #f3f4f6 !important;
    }
}
