/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* Material Symbols */
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap');

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: white;
    color: #111827;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Material Symbols font settings */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* Custom animations */
@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.15); }
    28% { transform: scale(1); }
    42% { transform: scale(1.15); }
    70% { transform: scale(1); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes download-prompt-enter {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Interactive button styles */
.interactive-button {
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.interactive-button:hover {
    transform: translateY(-1px);
}

.interactive-button:active {
    transform: translateY(0);
}

.engagement-button:hover {
    animation: heartBeat 0.6s ease-in-out;
}

/* Enhanced backdrop blur */
.enhanced-backdrop {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background-color: rgba(255, 255, 255, 0.9);
}

/* Download CTA pulse animation */
.download-cta-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Shimmer effect */
.shimmer-effect {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

/* Video container specific styles */
.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: #f3f4f6;
}

@media (min-width: 1024px) {
    .video-container {
        border-radius: 0.5rem;
        margin: 0 1rem;
        width: auto;
    }
}

/* Post container specific styles */
.post-container {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 480px;
    margin: 0 auto;
    background: white;
    overflow-x: hidden;
    padding-bottom: 12rem;
}

@media (min-width: 1024px) {
    .post-container {
        max-width: 512px;
    }
}

@media (min-width: 1280px) {
    .post-container {
        max-width: 768px;
    }
}

/* Download prompt modal */
.download-prompt-enter {
    animation: download-prompt-enter 0.3s ease-out;
}

/* Safe area padding for mobile */
.pb-safe {
    padding-bottom: env(safe-area-inset-bottom);
}

/* Custom utility classes for consistency */
.w-full { width: 100%; }
.h-full { height: 100%; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-6 { padding-bottom: 1.5rem; }
.pt-6 { padding-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mx-4 { margin-left: 1rem; margin-right: 1rem; }
.rounded-full { border-radius: 9999px; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.border { border-width: 1px; }
.border-t { border-top-width: 1px; }
.border-t-2 { border-top-width: 2px; }
.border-gray-50 { border-color: #f9fafb; }
.border-gray-100 { border-color: #f3f4f6; }
.border-primary-200 { border-color: #bae6fd; }
.bg-white { background-color: white; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-gray-900 { background-color: #111827; }
.bg-primary-50 { background-color: #f0f9ff; }
.bg-primary-100 { background-color: #e0f2fe; }
.bg-primary-500 { background-color: #0ea5e9; }
.bg-primary-600 { background-color: #0284c7; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-4xl { font-size: 2.25rem; }
.text-6xl { font-size: 3.75rem; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.leading-tight { line-height: 1.25; }
.leading-snug { line-height: 1.375; }
.leading-relaxed { line-height: 1.625; }
.tracking-tight { letter-spacing: -0.025em; }
.text-center { text-align: center; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-gray-900 { color: #111827; }
.text-white { color: white; }
.text-primary-500 { color: #0ea5e9; }
.uppercase { text-transform: uppercase; }
.cursor-pointer { cursor: pointer; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.top-2 { top: 0.5rem; }
.top-3 { top: 0.75rem; }
.right-2 { right: 0.5rem; }
.right-3 { right: 0.75rem; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.z-10 { z-index: 10; }
.z-30 { z-index: 30; }
.z-50 { z-index: 50; }
.z-60 { z-index: 60; }
.overflow-hidden { overflow: hidden; }
.overflow-x-hidden { overflow-x: hidden; }
.aspect-square { aspect-ratio: 1 / 1; }
.object-cover { object-fit: cover; }
.shrink-0 { flex-shrink: 0; }
.transform { transform: translateX(0) translateY(0) rotate(0) skewX(0) skewY(0) scaleX(1) scaleY(1); }
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-colors { transition-property: color, background-color, border-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-300 { transition-duration: 300ms; }
.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.hover\:bg-gray-100:hover { background-color: #f3f4f6; }
.hover\:bg-gray-200:hover { background-color: #e5e7eb; }
.hover\:bg-gray-300:hover { background-color: #d1d5db; }
.hover\:bg-gray-600:hover { background-color: #4b5563; }
.hover\:bg-gray-800:hover { background-color: #1f2937; }
.hover\:bg-primary-50:hover { background-color: #f0f9ff; }
.hover\:bg-primary-600:hover { background-color: #0284c7; }
.hover\:text-gray-600:hover { color: #4b5563; }
.hover\:text-gray-700:hover { color: #374151; }
.hover\:scale-105:hover { transform: scale(1.05); }
.hover\:scale-110:hover { transform: scale(1.1); }
.hover\:shadow-2xl:hover { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.animate-spin { animation: spin 1s linear infinite; }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

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

/* Responsive utilities */
@media (min-width: 1024px) {
    .lg\:max-w-2xl { max-width: 42rem; }
    .lg\:max-w-3xl { max-width: 48rem; }
    .lg\:w-auto { width: auto; }
    .lg\:h-12 { height: 3rem; }
    .lg\:w-12 { width: 3rem; }
    .lg\:h-11 { height: 2.75rem; }
    .lg\:w-11 { width: 2.75rem; }
    .lg\:h-9 { height: 2.25rem; }
    .lg\:px-4 { padding-left: 1rem; padding-right: 1rem; }
    .lg\:px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
    .lg\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
    .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
    .lg\:py-4 { padding-top: 1rem; padding-bottom: 1rem; }
    .lg\:pb-6 { padding-bottom: 1.5rem; }
    .lg\:mx-4 { margin-left: 1rem; margin-right: 1rem; }
    .lg\:rounded-lg { border-radius: 0.5rem; }
    .lg\:text-xs { font-size: 0.75rem; }
    .lg\:text-sm { font-size: 0.875rem; }
    .lg\:text-base { font-size: 1rem; }
    .lg\:text-lg { font-size: 1.125rem; }
    .lg\:text-xl { font-size: 1.25rem; }
    .lg\:text-2xl { font-size: 1.5rem; }
    .lg\:text-3xl { font-size: 1.875rem; }
    .lg\:text-4xl { font-size: 2.25rem; }
}

@media (min-width: 1280px) {
    .xl\:max-w-3xl { max-width: 48rem; }
}

/* Specific size classes used in the template */
.size-12 { width: 3rem; height: 3rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-11 { height: 2.75rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.h-64 { height: 16rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-11 { width: 2.75rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.w-sm { width: 24rem; }

/* Text size variations */
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }
.text-\[13px\] { font-size: 13px; }
.text-\[15px\] { font-size: 15px; }
.text-\[28px\] { font-size: 28px; }
.text-\[32px\] { font-size: 32px; }

@media (min-width: 1024px) {
    .lg\:text-\[16px\] { font-size: 16px; }
    .lg\:text-\[18px\] { font-size: 18px; }
    .lg\:text-\[28px\] { font-size: 28px; }
    .lg\:text-\[32px\] { font-size: 32px; }
}

/* Spacing variations */
.gap-1\.5 { gap: 0.375rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }

/* Letter spacing */
.tracking-\[0\.1em\] { letter-spacing: 0.1em; }

/* Line height */
.leading-\[1\.6\] { line-height: 1.6; }

/* Background gradients */
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.from-primary-50 { --tw-gradient-from: #f0f9ff; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(240, 249, 255, 0)); }
.to-primary-100 { --tw-gradient-to: #e0f2fe; }
.from-primary-500 { --tw-gradient-from: #0ea5e9; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(14, 165, 233, 0)); }
.to-primary-600 { --tw-gradient-to: #0284c7; }
.from-primary-600 { --tw-gradient-from: #0284c7; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(2, 132, 199, 0)); }
.to-primary-700 { --tw-gradient-to: #0369a1; }

/* Shadow */
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

/* Backdrop filter for enhanced backdrop */
.to-primary-100\/90 { --tw-gradient-to: rgba(224, 242, 254, 0.9); }

/* Max width for modal */
.max-w-sm { max-width: 24rem; }

/* Green colors for Android button */
.bg-green-600 { background-color: #16a34a; }
.hover\:bg-green-700:hover { background-color: #15803d; }

/* Black colors for iOS button */
.bg-black { background-color: #000000; }
.hover\:bg-gray-800:hover { background-color: #1f2937; }

/* Black colors for iOS button */
.bg-black { background-color: #000000; }
.hover\:bg-gray-800:hover { background-color: #1f2937; }

/* Additional custom styles to match React version exactly */
.flex-shrink-0 { flex-shrink: 0; }
.flex-grow { flex-grow: 1; }

/* Button specific styles */
button {
    font-family: inherit;
}

/* Ensure proper image loading */
img {
    max-width: 100%;
    height: auto;
}

/* Video specific styles */
video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ensure proper spacing and layout */
.post-container > * {
    position: relative;
}

/* Loading state */
.loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 16rem;
}

.spinner {
    width: 3rem;
    height: 3rem;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #0ea5e9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Error state styles */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
    text-align: center;
}

.error-container .material-symbols-outlined {
    font-size: 4rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.error-container p {
    color: #4b5563;
    margin-bottom: 1rem;
}

.error-container button {
    background: #0ea5e9;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

/* Video player styles */
.video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

.video-overlay:hover {
    background: rgba(0, 0, 0, 0.5);
}

.play-button {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.play-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.play-icon {
    font-size: 2rem !important;
    color: #374151;
    margin-left: 2px; /* Slight offset to center the play icon visually */
}

.media-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

.media-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modal overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    max-width: 24rem;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: download-prompt-enter 0.3s ease-out;
}

/* Modal component styles */
.modal {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    max-width: 24rem;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: download-prompt-enter 0.3s ease-out;
}

.modal-icon {
    background: #fef2f2;
    border-radius: 50%;
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.modal-icon .material-symbols-outlined {
    color: #ef4444;
    font-size: 2rem;
}

/* Different icon colors for different modal types */
.modal-icon .material-symbols-outlined[data-icon="warning"] {
    color: #f59e0b;
}

.modal-icon .material-symbols-outlined[data-icon="download"] {
    color: #ef4444;
}

.modal h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}

.modal p {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.store-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.store-btn {
    flex: 1;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.store-btn.ios {
    background: #000;
}

.store-btn.ios:hover {
    background: #374151;
}

.store-btn.android {
    background: #059669;
}

.store-btn.android:hover {
    background: #047857;
}

.store-btn .material-symbols-outlined {
    font-size: 1.125rem;
}

.modal-close {
    width: 100%;
    background: #f3f4f6;
    color: #374151;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #e5e7eb;
}

.modal-close.get-app {
    background: #ef4444;
    color: white;
}

.modal-close.get-app:hover {
    background: #dc2626;
}

/* Hide elements by default for progressive enhancement */
.hidden { display: none !important; }
.block { display: block !important; }

/* Ensure proper font loading */
.font-display { font-family: 'Plus Jakarta Sans', sans-serif; }

/* Responsive breakpoint utilities */
@media (max-width: 1023px) {
    /* Mobile-first adjustments */
    .post-container {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Ensure consistent button styles */
button, .btn {
    outline: none;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

button:focus, .btn:focus {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .fixed, .sticky {
        position: static !important;
    }
    
    .download-cta, .modal-overlay {
        display: none !important;
    }
}
