/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #1a1a1a;
    --bg-hover: #222222;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #666666;
    --border-color: #333333;
    --accent-primary: #00d4aa;
    --accent-secondary: #7c3aed;
    --accent-iphone: #007aff;
    --accent-samsung: #1f65ff;
    --accent-oneplus: #eb0029;
    --accent-pixel: #4285f4;
    --accent-xiaomi: #ff6900;
    --accent-vivo: #4169e1;
    --accent-oppo: #1ba856;
    --accent-realme: #fecc02;
    --accent-nothing: #ffffff;
    --gradient-primary: linear-gradient(135deg, #00d4aa 0%, #7c3aed 100%);
    --gradient-card: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.4);
    
    /* Festival Colors */
    --festival-primary: #ff6b6b;
    --festival-secondary: #ffd93d;
    --festival-accent: #6bcf7f;
    --festival-orange: #ff8a80;
    --festival-pink: #ff80ab;
    --festival-gradient: linear-gradient(135deg, #ff6b6b 0%, #ffd93d 50%, #6bcf7f 100%);
    --festival-glow: 0 0 20px rgba(255, 107, 107, 0.5);
    --festival-card-gradient: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(255, 217, 61, 0.1) 50%, rgba(107, 207, 127, 0.1) 100%);
    --free-gradient: linear-gradient(45deg, #ff6b6b, #ffd93d, #6bcf7f, #ff8a80);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Festival Banner */
.festival-banner {
    background: var(--festival-gradient);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: var(--festival-glow);
    animation: festivalPulse 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.festival-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s ease-in-out infinite;
}

.festival-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.festival-badge i {
    color: #ff80ab;
    animation: heartBeat 1.5s ease-in-out infinite;
}

.festival-offer {
    margin-bottom: 12px;
}

.offer-text {
    display: block;
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 4px;
    animation: bounce 2s ease-in-out infinite;
}

.offer-subtitle {
    font-size: 1rem;
    color: #fff;
    font-weight: 600;
    opacity: 0.95;
}

.festival-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    color: #fff;
    background: rgba(0,0,0,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.festival-timer i {
    animation: spin 2s linear infinite;
}



/* Links Section */
.links-section {
    flex: 1;
    margin-bottom: 30px;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 140px;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-card);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.link-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-primary);
}

.link-card:hover::before {
    opacity: 1;
}

.link-card:active {
    transform: translateY(0);
}

.link-icon {
    width: 100px;
    height: 120px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Mobile Image Complete Styling */
.mobile-image {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 5px;
    transition: all 0.3s ease;
    background: transparent;
    padding: 2px;
    display: block;
}

/* Hover Effects */
.link-card:hover .mobile-image {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.link-card:hover .link-icon {
    border-color: var(--festival-primary);
    box-shadow: 0 6px 12px rgba(255, 107, 107, 0.3);
}

/* Loading State */
.mobile-image:not(.loaded) {
    background: linear-gradient(90deg, 
        rgba(255,255,255,0.1) 25%, 
        rgba(255,255,255,0.2) 50%, 
        rgba(255,255,255,0.1) 75%);
    background-size: 200% 100%;
    animation: imageLoading 1.5s infinite;
}

@keyframes imageLoading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Image loaded state */
.mobile-image.loaded {
    animation: none;
    background: transparent;
}

/* Fallback Icon Styling */
.fallback-icon {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--festival-gradient);
    color: white;
    font-size: 2rem;
    border-radius: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Error handling */
.mobile-image:error {
    display: none;
}

.mobile-image:error + .fallback-icon {
    display: flex;
}

/* Brand specific fallback styling */
.link-card.iphone .fallback-icon {
    background: var(--accent-iphone);
}

.link-card.samsung .fallback-icon {
    background: var(--accent-samsung);
}

.link-card.oneplus .fallback-icon {
    background: var(--accent-oneplus);
}

.link-card.pixel .fallback-icon {
    background: var(--accent-pixel);
}

.link-card.xiaomi .fallback-icon {
    background: var(--accent-xiaomi);
}

.link-card.vivo .fallback-icon {
    background: var(--accent-vivo);
}

.link-card.oppo .fallback-icon {
    background: var(--accent-oppo);
}

.link-card.realme .fallback-icon {
    background: var(--accent-realme);
    color: black;
}

.link-card.nothing .fallback-icon {
    background: var(--accent-nothing);
    color: black;
}

.link-card.all-brands .fallback-icon {
    background: var(--festival-gradient);
}

.link-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.link-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.link-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Original Price Strikethrough */
.original-price {
    text-decoration: line-through;
    color: #ff6b6b;
    font-weight: 500;
    opacity: 0.7;
}

.link-arrow {
    font-size: 1rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.link-card:hover .link-arrow {
    color: var(--accent-primary);
    transform: translateX(4px);
}

/* Festival Card Styling */
.festival-card {
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
                var(--festival-gradient) border-box;
    position: relative;
    overflow: hidden;
}

.festival-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--festival-card-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.festival-card:hover::after {
    opacity: 1;
}

.festival-discount-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--festival-gradient);
    color: white;
    padding: 6px 12px;
    border-radius: 0 14px 0 14px;
    font-size: 0.75rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    z-index: 3;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

.free-tag {
    background: var(--free-gradient);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 2s ease-in-out infinite;
    font-weight: 900;
    text-shadow: none;
}



/* Brand-specific styles */
.link-card.iphone .link-icon {
    background: var(--accent-iphone);
    color: white;
}

.link-card.samsung .link-icon {
    background: var(--accent-samsung);
    color: white;
}

.link-card.oneplus .link-icon {
    background: var(--accent-oneplus);
    color: white;
}

.link-card.pixel .link-icon {
    background: var(--accent-pixel);
    color: white;
}

.link-card.xiaomi .link-icon {
    background: var(--accent-xiaomi);
    color: white;
}

.link-card.vivo .link-icon {
    background: var(--accent-vivo);
    color: white;
}

.link-card.oppo .link-icon {
    background: var(--accent-oppo);
    color: white;
}

.link-card.realme .link-icon {
    background: var(--accent-realme);
    color: black;
}

.link-card.nothing .link-icon {
    background: var(--accent-nothing);
    color: black;
}

.link-card.all-brands .link-icon {
    background: var(--gradient-primary);
    color: white;
}

/* Brand logos */
.oneplus-logo,
.mi-logo,
.vivo-logo,
.oppo-logo,
.realme-logo,
.nothing-logo {
    font-weight: 700;
    font-size: 1.25rem;
}

.oneplus-logo {
    font-family: 'Inter', sans-serif;
}



/* Contact Section */
.contact-section {
    margin-bottom: 30px;
}

.contact-title {
    text-align: center;
    margin-bottom: 20px;
}

.contact-title h3 {
    font-size: 1.25rem;
    background: var(--festival-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    animation: rainbow 3s linear infinite;
}

.contact-links {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.contact-links .contact-btn {
    min-width: 280px;
    padding: 16px 24px;
    font-size: 1rem;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    flex: 1;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.contact-btn.whatsapp {
    background: #25d366;
    color: white;
    border-color: #25d366;
}

.contact-btn.call {
    background: var(--bg-card);
    color: var(--text-primary);
}

.contact-btn.email {
    background: var(--bg-card);
    color: var(--text-primary);
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.contact-btn.whatsapp:hover {
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.festival-contact {
    border: 2px solid var(--festival-primary);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(255, 107, 107, 0.1) 100%);
    position: relative;
}

.festival-contact::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--festival-gradient);
    border-radius: 14px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.festival-contact:hover::before {
    opacity: 0.3;
}

.festival-contact:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 107, 107, 0.4);
}

/* Footer */
.footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.social-links a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.25rem;
}

.social-links a:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 170, 0.3);
}

.festival-footer-banner {
    background: var(--festival-gradient);
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    animation: festivalPulse 2.5s ease-in-out infinite;
}

.festival-footer-banner i {
    color: var(--festival-secondary);
    animation: bounce 2s ease-in-out infinite;
}

.footer-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        padding: 16px;
    }



    .link-card {
        padding: 20px;
        gap: 16px;
        min-height: 120px;
    }

    .link-icon {
        width: 80px;
        height: 100px;
        font-size: 1.25rem;
        border-radius: 5px;
    }

    .mobile-image {
        border-radius: 5px;
        padding: 2px;
    }

    .fallback-icon {
        border-radius: 5px;
        font-size: 1.5rem;
    }

    .link-content h3 {
        font-size: 1rem;
    }

    .link-content p {
        font-size: 0.8rem;
    }

    .contact-links {
        flex-direction: column;
        gap: 8px;
    }

    .contact-links .contact-btn {
        min-width: 100%;
        padding: 16px 20px;
        font-size: 1rem;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 12px;
    }



    .link-card {
        padding: 14px;
    }
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.link-card {
    animation: fadeInUp 0.6s ease forwards;
}

.link-card:nth-child(1) { animation-delay: 0.1s; }
.link-card:nth-child(2) { animation-delay: 0.2s; }
.link-card:nth-child(3) { animation-delay: 0.3s; }
.link-card:nth-child(4) { animation-delay: 0.4s; }
.link-card:nth-child(5) { animation-delay: 0.5s; }
.link-card:nth-child(6) { animation-delay: 0.6s; }
.link-card:nth-child(7) { animation-delay: 0.7s; }
.link-card:nth-child(8) { animation-delay: 0.8s; }
.link-card:nth-child(9) { animation-delay: 0.9s; }
.link-card:nth-child(10) { animation-delay: 1.0s; }

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* Ripple effect */
.link-card {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(2);
        opacity: 0;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --bg-primary: #000000;
        --bg-card: #111111;
        --text-primary: #ffffff;
        --border-color: #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode override (already dark by default) */
@media (prefers-color-scheme: light) {
    /* If you want a light version, uncomment and customize:
    :root {
        --bg-primary: #ffffff;
        --bg-card: #f8f9fa;
        --text-primary: #212529;
        --text-secondary: #6c757d;
        --border-color: #dee2e6;
    }
    */
}

/* Festival Animations */
@keyframes festivalPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: var(--festival-glow);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(255, 107, 107, 0.8);
    }
}



@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

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

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

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

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

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

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

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

@keyframes borderGlow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
    }
    50% { 
        box-shadow: 0 0 40px rgba(255, 217, 61, 0.6);
    }
}

@keyframes urgentBlink {
    0%, 100% { 
        background: rgba(0,0,0,0.2);
        transform: scale(1);
    }
    50% { 
        background: rgba(255,255,255,0.1);
        transform: scale(1.05);
    }
}

/* Responsive Festival Adjustments */
@media (max-width: 480px) {
    .festival-banner {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .offer-text {
        font-size: 1.3rem;
    }
    
    .festival-discount-badge {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    .free-tag {
        font-size: 0.9rem;
    }
}

@media (max-width: 360px) {
    .festival-banner {
        padding: 14px;
    }
    
    .offer-text {
        font-size: 1.1rem;
    }
    
    .festival-timer {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
}