/* QRMint - Custom Styles */
/* This file supplements Tailwind CSS with custom component styles */

/* ===============================================
   GLOBAL STYLES
   =============================================== */

* {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection color */
::selection {
    background-color: #059669;
    color: white;
}

/* ===============================================
   FORM INPUTS
   =============================================== */

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 16px; /* Prevent iOS zoom on focus */
    transition: all 0.2s ease;
    background-color: white;
}

.form-input:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-input:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

/* Textarea specific */
textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

/* Select dropdown */
select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%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 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

/* ===============================================
   COLOR PICKER
   =============================================== */

.color-picker {
    width: 48px;
    height: 48px;
    padding: 0;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
    /* Better touch support */
    -webkit-tap-highlight-color: rgba(5, 150, 105, 0.2);
    touch-action: manipulation;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 0.25rem;
}

.color-picker::-moz-color-swatch {
    border: none;
    border-radius: 0.25rem;
}

.color-picker:hover {
    border-color: #059669;
}

.color-picker:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

/* ===============================================
   QR TYPE BUTTONS - Premium Card Design
   =============================================== */

.qr-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 1rem;
    background: linear-gradient(145deg, #ffffff 0%, #f9fafb 100%);
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    /* Better touch support */
    -webkit-tap-highlight-color: rgba(5, 150, 105, 0.2);
    touch-action: manipulation;
}

.qr-type-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.qr-type-btn:hover {
    border-color: #10b981;
    color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.15);
}

.qr-type-btn:hover::before {
    opacity: 1;
}

.qr-type-btn.active {
    border-color: #059669;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.35);
    transform: translateY(-2px);
}

.qr-type-btn.active::before {
    opacity: 0;
}

.qr-type-btn svg {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0.375rem;
}

.qr-type-btn:hover svg {
    transform: scale(1.15) rotate(-3deg);
}

.qr-type-btn.active svg {
    transform: scale(1.1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Ripple effect on click */
.qr-type-btn:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

/* ===============================================
   RANGE SLIDER
   =============================================== */

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    outline: none;
    touch-action: manipulation;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #059669;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background: #047857;
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #059669;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.1);
    background: #047857;
}

/* ===============================================
   QR CODE CONTAINER - Premium Display
   =============================================== */

#qr-container {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(5, 150, 105, 0.1);
    box-shadow:
        inset 0 2px 20px rgba(5, 150, 105, 0.03),
        0 4px 30px rgba(0, 0, 0, 0.05);
    /* Mobile centering */
    display: flex;
    align-items: center;
    justify-content: center;
}

#qr-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 2px 2px, rgba(5, 150, 105, 0.06) 1px, transparent 0);
    background-size: 24px 24px;
    opacity: 0.8;
}

/* Decorative corner accents */
#qr-container::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

#qr-code {
    position: relative;
    z-index: 1;
    /* Center content on all screen sizes */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
}

#qr-code img,
#qr-code canvas {
    border-radius: 12px;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.12),
        0 8px 20px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    /* Responsive sizing */
    max-width: 100%;
    height: auto;
}

#qr-code:hover img,
#qr-code:hover canvas {
    transform: scale(1.02);
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.15),
        0 10px 25px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.9);
}

/* QR code wrapper for premium frame effect */
.qr-frame {
    padding: 16px;
    background: white;
    border-radius: 16px;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.05),
        0 10px 40px rgba(0, 0, 0, 0.08);
}

/* Placeholder state styling */
#qr-code .text-gray-400 {
    animation: gentlePulse 2s ease-in-out infinite;
}

@keyframes gentlePulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ===============================================
   FAQ ACCORDION
   =============================================== */

.faq-item {
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #059669;
}

.faq-question {
    background: none;
    border: none;
    cursor: pointer;
    /* Better touch support */
    -webkit-tap-highlight-color: rgba(5, 150, 105, 0.2);
    touch-action: manipulation;
}

.faq-question:hover {
    background-color: #f9fafb;
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===============================================
   BUTTONS
   =============================================== */

button {
    cursor: pointer;
    font-family: inherit;
    /* Better touch support */
    -webkit-tap-highlight-color: rgba(5, 150, 105, 0.2);
    touch-action: manipulation;
}

button:disabled {
    cursor: not-allowed;
}

/* Primary button pulse animation on hover */
#generate-btn {
    position: relative;
    overflow: hidden;
}

#generate-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

#generate-btn:hover::after {
    width: 300px;
    height: 300px;
}

/* Download buttons */
#download-png:not(:disabled):hover,
#download-svg:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

/* ===============================================
   TOAST NOTIFICATION
   =============================================== */

#toast {
    z-index: 9999;
}

#toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ===============================================
   LOADING SPINNER
   =============================================== */

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===============================================
   MOBILE MENU
   =============================================== */

#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===============================================
   RESPONSIVE ADJUSTMENTS - MOBILE UX
   =============================================== */

@media (max-width: 640px) {
    /* QR Type buttons - ensure minimum touch target of 44px */
    .qr-type-btn {
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
        min-height: 60px;
    }

    .qr-type-btn svg {
        width: 1.25rem;
        height: 1.25rem;
    }

    /* Disable hover effects on touch devices */
    .qr-type-btn:hover {
        transform: none;
    }

    .qr-type-btn.active {
        transform: none;
    }

    /* QR Container - Center QR code on mobile */
    #qr-container {
        min-height: 280px;
        padding: 1.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Ensure QR code is centered within container */
    #qr-code {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        text-align: center;
    }

    /* Responsive QR code image - prevent overflow */
    #qr-code img,
    #qr-code canvas {
        max-width: 100%;
        height: auto;
    }

    /* Disable hover scale on touch */
    #qr-code:hover img,
    #qr-code:hover canvas {
        transform: none;
    }

    /* Form inputs - 16px font prevents iOS zoom on focus */
    .form-input {
        padding: 0.75rem 1rem;
        font-size: 16px;
    }

    /* Larger color picker tap targets for mobile (minimum 48px) */
    .color-picker {
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
    }

    /* Download buttons - larger tap targets */
    #download-png,
    #download-svg {
        min-height: 48px;
        padding: 0.875rem 1rem;
    }

    /* Generate button - larger tap target */
    #generate-btn {
        min-height: 52px;
        padding: 1rem;
    }

    /* Clear logo button - larger tap target */
    #clear-logo {
        min-height: 44px;
        min-width: 44px;
        padding: 0.625rem 0.75rem;
    }

    /* Range slider - larger touch target */
    input[type="range"] {
        height: 12px;
    }

    input[type="range"]::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
    }

    input[type="range"]::-moz-range-thumb {
        width: 28px;
        height: 28px;
    }

    /* FAQ - larger tap targets */
    .faq-question {
        min-height: 48px;
        padding: 1rem;
    }

    /* Share buttons - larger tap targets (minimum 44px) */
    #copy-link,
    #share-twitter,
    #share-linkedin {
        min-width: 44px;
        min-height: 44px;
        padding: 0.625rem;
    }
}

/* Toast notification - center on mobile for better visibility */
@media (max-width: 480px) {
    #toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        max-width: none;
        text-align: center;
        border-radius: 0.75rem;
    }
}

/* vCard name fields - stack on very small screens */
@media (max-width: 400px) {
    #vcard-fields .grid.grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* ===============================================
   ANIMATIONS
   =============================================== */

/* Fade in up animation for elements */
.animate-fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* Pulse animation for QR code generation */
.animate-pulse-once {
    animation: premiumPulse 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes premiumPulse {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }
    50% {
        transform: scale(1.03);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Shake animation for errors */
.animate-shake {
    animation: shake 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    20%, 60% {
        transform: translateX(-6px);
    }
    40%, 80% {
        transform: translateX(6px);
    }
}

/* Success checkmark animation */
.animate-success {
    animation: successBounce 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Floating animation for decorative elements */
.animate-float {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Glow effect for active states */
.animate-glow {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 20px rgba(5, 150, 105, 0.2);
    }
    to {
        box-shadow: 0 0 30px rgba(5, 150, 105, 0.4);
    }
}

/* Scale in animation */
.animate-scale-in {
    animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* QR Placeholder styling */
.qr-placeholder {
    padding: 1rem;
}

.qr-placeholder p {
    transition: color 0.3s ease;
}

/* Toast animation enhancement */
#toast {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

#toast.show {
    animation: toastSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes toastSlideIn {
    from {
        transform: translateY(20px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* QR Status badge */
#qr-status {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===============================================
   PRINT STYLES
   =============================================== */

@media print {
    nav,
    #features,
    #pricing,
    #faq,
    footer,
    .bg-gradient-to-br {
        display: none !important;
    }

    #qr-container {
        background: white !important;
        box-shadow: none !important;
    }

    button {
        display: none !important;
    }
}

/* ===============================================
   ACCESSIBILITY
   =============================================== */

/* Skip link for keyboard navigation */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    z-index: 9999;
    padding: 1rem 1.5rem;
    background-color: #059669;
    color: white;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 0.5rem 0;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #047857;
    outline-offset: 2px;
}

/* Screen reader only class */
.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;
}

.sr-only.focus\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Focus visible styles for keyboard navigation */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #059669;
    outline-offset: 2px;
}

/* Enhanced focus for QR type buttons */
.qr-type-btn:focus-visible {
    outline: 3px solid #059669;
    outline-offset: 2px;
    box-shadow: 0 0 0 6px rgba(5, 150, 105, 0.2);
}

/* Focus styles for color picker */
.color-picker:focus-visible {
    outline: 3px solid #059669;
    outline-offset: 2px;
    box-shadow: 0 0 0 6px rgba(5, 150, 105, 0.2);
}

/* Focus styles for FAQ buttons */
.faq-question:focus-visible {
    outline: 3px solid #059669;
    outline-offset: -2px;
    background-color: #ecfdf5;
}

/* Focus styles for range slider */
input[type="range"]:focus-visible {
    outline: 3px solid #059669;
    outline-offset: 4px;
}

input[type="range"]:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.3);
}

/* Focus within for file upload label */
label:focus-within {
    outline: 3px solid #059669;
    outline-offset: 2px;
}

/* Ensure links in footer have visible focus */
footer a:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Reduce motion for users who prefer it */
@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;
    }

    .skip-link {
        transition: none;
    }
}

/* High contrast mode adjustments */
@media (prefers-contrast: high) {
    .form-input {
        border-width: 3px;
        border-color: #000;
    }

    .form-input:focus {
        border-color: #059669;
        box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.4);
    }

    .qr-type-btn {
        border-width: 3px;
    }

    .qr-type-btn.active {
        border-color: #000;
    }

    button:focus-visible,
    a:focus-visible,
    input:focus-visible,
    select:focus-visible,
    textarea:focus-visible {
        outline-width: 4px;
        outline-color: #000;
    }

    /* Ensure sufficient contrast for text */
    .text-gray-400 {
        color: #4b5563;
    }

    .text-gray-500 {
        color: #374151;
    }

    .text-gray-600 {
        color: #1f2937;
    }

    /* High contrast for pricing unavailable features */
    .text-gray-400 svg {
        stroke-width: 3;
    }
}

/* Forced colors mode (Windows High Contrast) */
@media (forced-colors: active) {
    .qr-type-btn {
        border: 2px solid ButtonText;
    }

    .qr-type-btn.active {
        background: Highlight;
        color: HighlightText;
        border-color: Highlight;
    }

    .form-input {
        border: 2px solid ButtonText;
    }

    button {
        border: 2px solid ButtonText;
    }
}

/* ===============================================
   DARK MODE (future enhancement)
   =============================================== */

@media (prefers-color-scheme: dark) {
    /*
    Note: Dark mode styles can be added here for future enhancement.
    For now, the site uses a light theme only.
    */
}

/* ===============================================
   CELEBRATE ANIMATION (QR Generation Success)
   =============================================== */

.celebrate {
    animation: celebrate-pulse 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes celebrate-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
        filter: brightness(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* ===============================================
   CONFETTI ANIMATION
   =============================================== */

.confetti {
    pointer-events: none;
    z-index: 9999;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-10vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) rotate(720deg);
        opacity: 0;
    }
}

/* ===============================================
   RAINBOW BORDER (Easter Egg)
   =============================================== */

.rainbow-border {
    animation: rainbow-glow 2s ease-in-out infinite;
}

@keyframes rainbow-glow {
    0% {
        box-shadow: 0 0 20px #ff0000, 0 0 40px #ff0000;
    }
    16.67% {
        box-shadow: 0 0 20px #ff8800, 0 0 40px #ff8800;
    }
    33.33% {
        box-shadow: 0 0 20px #ffff00, 0 0 40px #ffff00;
    }
    50% {
        box-shadow: 0 0 20px #00ff00, 0 0 40px #00ff00;
    }
    66.67% {
        box-shadow: 0 0 20px #0088ff, 0 0 40px #0088ff;
    }
    83.33% {
        box-shadow: 0 0 20px #8800ff, 0 0 40px #8800ff;
    }
    100% {
        box-shadow: 0 0 20px #ff0000, 0 0 40px #ff0000;
    }
}

/* ===============================================
   ORGANIC GROWTH - TEMPLATE GALLERY
   =============================================== */

.template-card {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.template-card:focus-visible {
    outline: 3px solid #059669;
    outline-offset: 2px;
}

.template-card:active {
    transform: scale(0.98);
}

/* Template card color swatches */
.template-card .flex.gap-2 span {
    transition: transform 0.2s ease;
}

.template-card:hover .flex.gap-2 span {
    transform: scale(1.1);
}

/* ===============================================
   ORGANIC GROWTH - REFERRAL SECTION
   =============================================== */

.referral-input {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    letter-spacing: -0.5px;
}

/* ===============================================
   ORGANIC GROWTH - SHARE BUTTONS
   =============================================== */

.share-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.share-btn:active {
    transform: translateY(0);
}

/* ===============================================
   ORGANIC GROWTH - MODAL STYLES
   =============================================== */

/* Modal backdrop fade in */
#analytics-teaser-modal,
#upgrade-modal,
#referral-modal,
#embed-modal {
    animation: modalFadeIn 0.2s ease-out;
}

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

/* Modal content slide up */
#analytics-teaser-modal > div,
#upgrade-modal > div,
#referral-modal > div,
#embed-modal > div {
    animation: modalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal close button hover */
#analytics-teaser-modal button[onclick*="closeModal"],
#upgrade-modal button[onclick*="closeModal"],
#referral-modal button[onclick*="closeModal"],
#embed-modal button[onclick*="closeModal"] {
    transition: all 0.2s ease;
}

/* ===============================================
   ORGANIC GROWTH - BRANDING WATERMARK
   =============================================== */

.qr-branding {
    font-size: 10px;
    opacity: 0.5;
    text-align: center;
    margin-top: 4px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===============================================
   ORGANIC GROWTH - EMBED PREVIEW
   =============================================== */

.embed-preview {
    background: linear-gradient(145deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

/* Embed code block styling */
.embed-code pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 12px;
    line-height: 1.5;
}

/* ===============================================
   ORGANIC GROWTH - SOCIAL DOWNLOAD BUTTONS
   =============================================== */

/* Instagram gradient button */
button[onclick*="downloadForInstagram"] {
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

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

/* ===============================================
   ORGANIC GROWTH - USE CASE CARDS
   =============================================== */

#use-cases article {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#use-cases article:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

/* ===============================================
   MOBILE ADJUSTMENTS FOR NEW SECTIONS
   =============================================== */

@media (max-width: 640px) {
    /* Template gallery - 2 columns on mobile */
    #templates .grid {
        gap: 0.75rem;
    }

    .template-card {
        padding: 1rem;
    }

    .template-card .text-3xl {
        font-size: 1.5rem;
    }

    /* Use cases - stack on mobile */
    #use-cases .grid {
        gap: 1rem;
    }

    /* Social share buttons - stack on very small screens */
    .share-btn {
        width: 100%;
    }

    /* Modal mobile adjustments */
    #analytics-teaser-modal > div,
    #upgrade-modal > div,
    #referral-modal > div,
    #embed-modal > div {
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }
}
