/* ====================================
   Pulih Dari Luka - Custom Styles
   ==================================== */

/* Global */
* { scrollbar-width: thin; scrollbar-color: #E8A0BF #f5f5f5; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f5f5f5; }
::-webkit-scrollbar-thumb { background: #E8A0BF; border-radius: 10px; }

::selection { background: rgba(232,160,191,0.3); color: #2D1B2E; }

body { overflow-x: hidden; }

/* Navbar glass effect */
.nav-scrolled {
    background: rgba(255,255,255,0.85) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(45,27,46,0.08);
    border-bottom: 1px solid rgba(232,160,191,0.15);
}

/* Glassmorphism card */
.glass-card {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: 0 8px 32px rgba(45,27,46,0.06);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #D4789C, #E8A0BF, #D4789C);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Shimmer loading */
.shimmer {
    background: linear-gradient(90deg, #f5f5f5 25%, #e0e0e0 50%, #f5f5f5 75%);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
}

/* Hero floating shapes - GPU accelerated */
.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    animation: float 8s ease-in-out infinite;
    will-change: transform;
    transform: translateZ(0);
}
.floating-shape:nth-child(2) { animation-delay: -2s; animation-duration: 10s; }
.floating-shape:nth-child(3) { animation-delay: -4s; animation-duration: 12s; }

/* Scroll reveal animations */
.reveal {
    opacity: 1;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
    will-change: auto;
}
.reveal-left {
    opacity: 1;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right {
    opacity: 1;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

/* Disable reveal animations on mobile for better accessibility and stability */
@media (max-width: 1024px) {
    .reveal, .reveal-left, .reveal-right {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        visibility: visible !important;
    }
}

/* Event card hover */
.event-card {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(212,120,156,0.2);
}
.event-card .poster-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}
.event-card:hover .poster-overlay {
    opacity: 1;
}

/* Ticket category card */
.ticket-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.ticket-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #D4789C, #E8A0BF);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}
.ticket-card:hover::before,
.ticket-card.selected::before {
    transform: scaleX(1);
}
.ticket-card.selected {
    border-color: #D4789C;
    background: linear-gradient(180deg, rgba(212,120,156,0.05), rgba(255,255,255,1));
}

/* Button ripple effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}
.btn-ripple::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}
.btn-ripple:hover::after { opacity: 1; }

/* Payment method card */
.payment-method {
    transition: all 0.2s ease;
    cursor: pointer;
}
.payment-method:hover {
    border-color: #E8A0BF;
    background: rgba(232,160,191,0.05);
}
.payment-method.selected {
    border-color: #D4789C;
    background: linear-gradient(180deg, rgba(212,120,156,0.08), transparent);
    box-shadow: 0 0 0 2px rgba(212,120,156,0.15);
}

/* Countdown timer */
.countdown-digit {
    background: linear-gradient(180deg, #2D1B2E, #3D2C3E);
    color: white;
    font-family: 'Poppins', monospace;
    font-weight: 700;
    border-radius: 12px;
    padding: 8px 12px;
    min-width: 48px;
    text-align: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(45,27,46,0.2);
}

/* QR Code container */
.qr-container {
    background: white;
    padding: 16px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: inline-block;
}

/* Status badges */
.badge-paid { background: #dcfce7; color: #166534; }
.badge-unpaid { background: #fef3c7; color: #92400e; }
.badge-expired { background: #fee2e2; color: #991b1b; }
.badge-failed { background: #fecaca; color: #991b1b; }
.badge-active { background: #dbeafe; color: #1e40af; }

/* Pulse animation for live indicator */
.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.6); }
    50% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
}

/* Toast notification */
.toast-enter { animation: slideUp 0.4s ease-out forwards; }
.toast-exit { animation: slideDown 0.3s ease-in forwards; }
@keyframes slideDown {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(20px); }
}

/* Scan result animations */
.scan-success { animation: scanPulse 0.5s ease-out; }
.scan-error { animation: scanShake 0.5s ease-out; }
@keyframes scanPulse {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes scanShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Form inputs */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #E8A0BF !important;
    box-shadow: 0 0 0 3px rgba(232,160,191,0.15) !important;
}

/* Responsive table */
@media (max-width: 768px) {
    .responsive-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Print styles for tickets */
@media print {
    nav, footer, .no-print { display: none !important; }
    body { background: white !important; }
    .print-only { display: block !important; }
}

/* Reduced motion: disable heavy animations for accessibility & CPU savings */
@media (prefers-reduced-motion: reduce) {
    .floating-shape { animation: none !important; }
    .reveal, .reveal-left, .reveal-right { 
        opacity: 1 !important; 
        transform: none !important; 
        transition: none !important; 
    }
    .event-card:hover { transform: none; }
    .countdown-digit { animation: none; }
    .live-dot { animation: none; }
    .shimmer { animation: none; }
}
