/* USHMA 2026 - Premium Festival Website Styles */

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== LOADING SCREEN ===== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    background: linear-gradient(135deg, #1e1b4b, #312e81, #1e40af);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: floatParticle 6s ease-in-out infinite;
}

.loading-particle:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.loading-particle:nth-child(2) {
    top: 60%;
    right: 20%;
    animation-delay: 1s;
}

.loading-particle:nth-child(3) {
    bottom: 30%;
    left: 30%;
    animation-delay: 2s;
}

.loading-particle:nth-child(4) {
    top: 40%;
    right: 40%;
    animation-delay: 3s;
}

.loading-particle:nth-child(5) {
    bottom: 20%;
    right: 10%;
    animation-delay: 4s;
}

@keyframes floatParticle {
    0%, 100% { 
        transform: translateY(0px) translateX(0px); 
        opacity: 0.3; 
    }
    50% { 
        transform: translateY(-30px) translateX(20px); 
        opacity: 1; 
    }
}

/* ===== CUSTOM ANIMATIONS ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes glow {
    0% { box-shadow: 0 0 20px rgba(168, 85, 247, 0.4); }
    100% { box-shadow: 0 0 40px rgba(168, 85, 247, 0.8), 0 0 60px rgba(168, 85, 247, 0.4); }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin-slow {
    animation: spin-slow 3s linear infinite;
}

/* ===== SMOOTH SCROLLING ENHANCEMENT ===== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* ===== HEADER STYLES ===== */
#header {
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#header.scrolled {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #f97316, #dc2626);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* ===== HERO SECTION ===== */
#home {
    background: linear-gradient(135deg, #1e1b4b, #312e81, #1e40af);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== RESPONSIVE TYPOGRAPHY ===== */
.text-responsive-xl {
    font-size: clamp(2rem, 5vw, 4rem);
}

.text-responsive-2xl {
    font-size: clamp(2.5rem, 6vw, 5rem);
}

.text-responsive-3xl {
    font-size: clamp(3rem, 8vw, 8rem);
}

/* ===== COUPON CARDS ===== */
.coupon-card {
    position: relative;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform;
}

.coupon-card:hover {
    transform: translateY(-10px) scale(1.02);
}

.coupon-card.featured {
    position: relative;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.05), rgba(236, 72, 153, 0.05));
}

.coupon-card.featured::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border-radius: 24px;
    z-index: -1;
    opacity: 0.7;
    animation: glow 2s ease-in-out infinite alternate;
}

.coupon-card .animate-slide-up {
    animation: slideUp 0.6s ease-out forwards;
}

/* ===== BUTTON STYLES ===== */
.buy-btn {
    position: relative;
    overflow: hidden;
    will-change: transform;
}

.buy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.buy-btn:hover::before {
    left: 100%;
}

.buy-btn:active {
    transform: scale(0.98);
}

/* ===== GALLERY STYLES ===== */
.gallery-item {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    will-change: transform;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item:hover::after {
    opacity: 1;
}

/* ===== PAYMENT PANEL ===== */
#payment-panel.show {
    display: block;
}

#payment-panel.show #panel-content {
    transform: translateY(0) translateX(0);
}

/* ===== SCROLL ANIMATIONS ===== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Mobile First - Base styles for mobile */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .coupon-card {
        margin-bottom: 1.5rem;
        padding: 1.5rem;
    }
    
    #panel-content {
        width: 100%;
        border-radius: 24px 24px 0 0;
        padding: 1.5rem;
    }
    
    .text-6xl {
        font-size: 2.5rem;
    }
    
    .text-8xl {
        font-size: 3rem;
    }
    
    .text-5xl {
        font-size: 2rem;
    }
    
    .py-20 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

/* Small tablets */
@media (min-width: 641px) and (max-width: 768px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .text-6xl {
        font-size: 3.5rem;
    }
    
    .text-8xl {
        font-size: 4.5rem;
    }
}

/* Tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Desktop */
@media (min-width: 1025px) {
    .container {
        max-width: 1200px;
    }
}

/* Large Desktop */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
    
    .text-6xl {
        font-size: 4rem;
    }
    
    .text-8xl {
        font-size: 6rem;
    }
}

/* Ultra-wide screens */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
}

/* Mobile landscape orientation */
@media (max-height: 500px) and (orientation: landscape) {
    #home {
        min-height: 100vh;
    }
    
    .text-6xl {
        font-size: 2rem;
    }
    
    .text-8xl {
        font-size: 2.5rem;
    }
    
    .py-20 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .coupon-card {
        transform: translateZ(0); /* Enable hardware acceleration */
    }
}

/* ===== UTILITY CLASSES ===== */
.gradient-text {
    background: linear-gradient(135deg, #f97316, #dc2626, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

/* ===== LOADING STATES ===== */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.coupon-card,
.gallery-item,
.buy-btn {
    transform: translateZ(0); /* Enable hardware acceleration */
    backface-visibility: hidden;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== FOCUS STYLES ===== */
button:focus,
a:focus {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

button:focus:not(:focus-visible) {
    outline: none;
}

/* ===== PRINT STYLES ===== */
@media print {
    #header,
    #payment-panel,
    #mobile-cta,
    #loading-screen {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .coupon-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #f97316, #dc2626);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ea580c, #b91c1c);
}