﻿
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Poppins', -apple-system, BlinkMacSystemFont, Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    min-height: 100vh;
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

    body.loaded {
        opacity: 1;
    }

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.hero-section {
    text-align: center;
    padding: 40px 20px;
    color: white;
    margin-bottom: 20px;
}

    .hero-section h1 {
        font-size: 2.8rem;
        margin-bottom: 15px;
        font-weight: 700;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
        animation: fadeInDown 0.8s ease;
    }

    .hero-section p {
        font-size: 1.2rem;
        opacity: 0.95;
        animation: fadeInUp 0.8s ease;
    }

.instruction-banner {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius: 60px;
    padding: 12px 25px;
    display: inline-block;
    margin-top: 20px;
    font-size: 1rem;
    animation: pulse 2s infinite;
}

    .instruction-banner i {
        margin-right: 10px;
    }

/* QR Code Grid */
.qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 30px;
    margin-bottom: 40px;
}

.qr-card {
    background: white;
    border-radius: 20px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

    .qr-card:nth-child(1) {
        animation-delay: 0.1s;
    }

    .qr-card:nth-child(2) {
        animation-delay: 0.2s;
    }

    .qr-card:nth-child(3) {
        animation-delay: 0.3s;
    }

    .qr-card:nth-child(4) {
        animation-delay: 0.4s;
    }

    .qr-card:nth-child(5) {
        animation-delay: 0.5s;
    }

    .qr-card:nth-child(6) {
        animation-delay: 0.6s;
    }

    .qr-card:nth-child(7) {
        animation-delay: 0.7s;
    }

    .qr-card:nth-child(8) {
        animation-delay: 0.8s;
    }

    .qr-card:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    }

    .qr-card:active {
        transform: translateY(-2px) scale(0.98);
    }

.card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.qr-card:hover .card-icon {
    transform: scale(1.1);
}

.qr-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.qr-code-container {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: 15px;
    padding: 15px;
    margin: 15px 0;
    position: relative;
    transition: all 0.3s ease;
}

.qr-card:hover .qr-code-container {
    background: linear-gradient(135deg, #e8e8e8 0%, #ddd 100%);
}

.qr-code-img {
    max-width: 180px;
    height: auto;
    margin: 0 auto;
    display: block;
    transition: transform 0.3s ease;
}

.qr-card:hover .qr-code-img {
    transform: scale(1.05);
}

.scan-instruction {
    font-size: 0.85rem;
    color: #666;
    margin-top: 10px;
}

    .scan-instruction i {
        margin-right: 5px;
        color: #4CAF50;
    }

.badge-popular {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    animation: bounce 2s infinite;
}

.divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    margin: 30px 0;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn-custom {
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border: 2px solid white;
}

.btn-primary-custom {
    background: white;
    color: #667eea;
}

    .btn-primary-custom:hover {
        background: transparent;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    }

.btn-secondary-custom {
    background: transparent;
    color: white;
}

    .btn-secondary-custom:hover {
        background: white;
        color: #667eea;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    }

.btn-custom:active {
    transform: translateY(0);
}

/* Footer */
.footer {
    text-align: center;
    color: white;
    padding: 30px;
    margin-top: 40px;
    opacity: 0.8;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: white;
    color: #333;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    animation: slideInRight 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Skeleton Loader */
.skeleton-card {
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 25px 20px;
    backdrop-filter: blur(10px);
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

/* Loading spinner */
.qr-loading {
    text-align: center;
    padding: 60px;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.help-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

    .help-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    }

/* ========== KEYFRAMES DEFINITIONS ========== */

/* Spin animation for loading spinner */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Fade In Down animation */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Up animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse animation for instruction banner */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Bounce animation for popular badge */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Slide In Right for toast notifications */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Skeleton pulse animation */
@keyframes skeletonPulse {
    0%, 100% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.8;
    }
}

/* Modal overlay animation */
@keyframes fadeInModal {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Modal content animation */
@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ========== MEDIA QUERIES ========== */

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-container {
        padding: 15px;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .qr-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .qr-card h3 {
        font-size: 1.3rem;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-custom {
        width: 80%;
        justify-content: center;
    }

    .instruction-banner {
        font-size: 0.9rem;
        padding: 10px 20px;
    }

    .toast-notification {
        bottom: 70px;
        right: 10px;
        left: 10px;
        font-size: 0.9rem;
    }

    .help-btn {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .hero-section {
        padding: 30px 15px;
    }

        .hero-section h1 {
            font-size: 1.5rem;
        }

    .qr-card {
        padding: 20px 15px;
    }

    .qr-code-img {
        max-width: 150px;
    }

    .btn-custom {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .instruction-banner {
        font-size: 0.8rem;
        padding: 8px 15px;
    }
}

/* Tablet Devices */
@media (min-width: 769px) and (max-width: 1024px) {
    .qr-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }

    .hero-section h1 {
        font-size: 2.2rem;
    }
}

/* Large Desktop Screens */
@media (min-width: 1400px) {
    .main-container {
        max-width: 1600px;
    }

    .qr-grid {
        gap: 30px;
    }

    .qr-card {
        padding: 30px 25px;
    }

    .qr-code-img {
        max-width: 200px;
    }
}

/* Print styles for QR codes */
@media print {
    body {
        background: white;
        opacity: 1;
    }

    .hero-section,
    .action-buttons,
    .footer,
    .instruction-banner,
    .help-btn,
    .toast-notification,
    .divider {
        display: none !important;
    }

    .qr-card {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
        animation: none;
        opacity: 1 !important;
        transform: none !important;
        background: white;
    }

    .qr-code-img {
        max-width: 150px;
    }

    .qr-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .badge-popular {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .qr-card {
        background: #2d2d2d;
    }

        .qr-card h3 {
            color: #fff;
        }

    .qr-code-container {
        background: linear-gradient(135deg, #3d3d3d 0%, #2d2d2d 100%);
    }

    .scan-instruction {
        color: #aaa;
    }

    .toast-notification {
        background: #2d2d2d;
        color: #fff;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .qr-card:hover {
        transform: none !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .qr-card {
        border: 2px solid #000;
    }

    .badge-popular {
        background: #000;
        color: #fff;
    }

    .btn-custom {
        border: 2px solid #000;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        padding: 20px;
    }

    .qr-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }

    .qr-card {
        padding: 15px;
    }
}


