/* Memora '26 - Dark Neon Event Aesthetics */

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

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Floating Orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: float 20s infinite ease-in-out;
}
.orb-1 {
    width: 600px; height: 600px;
    background: #6366f1;
    top: -200px; left: -200px;
    animation-delay: 0s;
}
.orb-2 {
    width: 500px; height: 500px;
    background: #a855f7;
    bottom: -150px; right: -150px;
    animation-delay: -7s;
}
.orb-3 {
    width: 400px; height: 400px;
    background: #10b981;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 10px) scale(1.02); }
}

/* Glass Card */
.glass-card {
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Ticket Type Selection */
.ticket-type-card.selected {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

/* Scanner Overlay */
.scanner-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
}

.scanner-frame {
    width: min(260px, 72vw);
    height: min(260px, 72vw);
    max-height: calc(70dvh - 120px);
    position: relative;
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 16px;
}

.corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border-color: #10b981;
    border-style: solid;
    border-width: 0;
}
.corner-tl { top: -2px; left: -2px; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 16px; }
.corner-tr { top: -2px; right: -2px; border-top-width: 3px; border-right-width: 3px; border-top-right-radius: 16px; }
.corner-bl { bottom: -2px; left: -2px; border-bottom-width: 3px; border-left-width: 3px; border-bottom-left-radius: 16px; }
.corner-br { bottom: -2px; right: -2px; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 16px; }

.scanner-line {
    position: absolute;
    left: 10px;
    right: 10px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #10b981, transparent);
    box-shadow: 0 0 15px #10b981;
    animation: scan 2s infinite ease-in-out;
    border-radius: 2px;
}

@keyframes scan {
    0%, 100% { top: 10px; }
    50% { top: calc(100% - 12px); }
}

/* Result Overlay Animations */
.result-verified {
    border-color: rgba(16, 185, 129, 0.5) !important;
    box-shadow: 0 0 60px rgba(16, 185, 129, 0.15);
}
.result-duplicate {
    border-color: rgba(239, 68, 68, 0.5) !important;
    box-shadow: 0 0 60px rgba(239, 68, 68, 0.15);
}
.result-invalid {
    border-color: rgba(239, 68, 68, 0.5) !important;
    box-shadow: 0 0 60px rgba(239, 68, 68, 0.15);
}

/* Pulse animation for live count */
@keyframes neonPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* QR Code styling in ticket pass */
.qr-container canvas,
.qr-container img {
    border-radius: 8px;
}

/* Filter button active state */
.filter-btn-active {
    background: rgba(99, 102, 241, 0.15) !important;
    color: #818cf8 !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
}

/* Select dropdown arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* html5-qrcode overrides */
#reader img[alt="Info icon"] { display: none !important; }
#reader__scan_region { min-height: 200px; }
#reader__dashboard { display: none !important; }

/* Ticket Pass Print Styles */
@media print {
    body { background: white !important; }
    .no-print { display: none !important; }
    .orb { display: none !important; }
}

/* Prevent iOS zoom on focus for inputs below 16px */
@media (max-width: 640px) {
    input,
    select,
    textarea {
        font-size: 16px;
    }
}

/* Ensure touch targets stay usable */
button, a, .filter-btn, .ticket-type-card, .create-type-card, .bulk-type-card {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Modal panel scroll safety on small screens */
.modal-panel {
    max-height: calc(100dvh - 1.5rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Digital Pass Card */
.ticket-pass {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}
.ticket-pass::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(99,102,241,0.1) 0%, transparent 70%);
}
.ticket-pass::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -30%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(168,85,247,0.08) 0%, transparent 70%);
}

/* Perforated edge */
.ticket-pass .perforation {
    position: relative;
    border-top: 2px dashed rgba(255,255,255,0.1);
}

.ticket-pass .perforation::before,
.ticket-pass .perforation::after {
    content: '';
    position: absolute;
    top: -12px;
    width: 24px;
    height: 24px;
    background: #0f172a;
    border-radius: 50%;
}
.ticket-pass .perforation::before { left: -12px; }
.ticket-pass .perforation::after { right: -12px; }
