* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Figtree', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to top right, #ffc3a0af, #fec5cf,#fedfe4, #ffebee, #fafafa);
    color: #1D1B20; 
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    margin: 0;
    padding: 0;
    width: 56.25vh; /* 9:16 ratio - if height is 100vh, width is 9/16 of that */
    max-width: 100vw;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Gallery Section (Top) */
.gallery-section {
    width: 100%;
    height: 33vh;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
    flex-shrink: 0; 
    transform: rotate(-10deg);
}

.image-filmstrip-container {
    width: 100%;
    height: 33vh;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden; 
    position: relative;
}

.image-filmstrip-row {
    flex: 1; 
    min-height: 0;
    display: flex;
    flex-direction: row;
    gap: 8px;
    position: relative;
    will-change: transform;  
}

.filmstrip-image {
    height: 100%;
    width: auto; 
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: block;
    flex-shrink: 0;
}

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

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

/* Content Section (Bottom) */
.content-section {
    width: 100%;
    padding: 0px 30px 20px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-y: auto;
    flex-shrink: 0; /* Ensure it doesn't shrink */
}

/* Decorative Stars */
.star {
    position: absolute;
    font-size: 2rem;
    opacity: 0.6;
    animation: twinkle 3s ease-in-out infinite;
    z-index: 10;
}

.star1 { 
    top: 2%; 
    left: 5%; 
    font-size: 3vmin;
    animation-delay: 0s; 
    background: linear-gradient(to left, #ed4264, #ffedbc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.star2 { 
    top: 5%; 
    right: 5%; 
    font-size: 2.5vmin;
    animation-delay: 0.5s; 
    background: linear-gradient(90deg, #D56E4D 0%, #9A46BB 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.star3 { 
    font-size: 4vmin;
    bottom: 5%; 
    left: 5%; 
    animation-delay: 1s; 
    background: linear-gradient(90deg, #D56E4D 0%, #9A46BB 25.96%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.star4 { 
    bottom: 10%; 
    right: 5%; 
    font-size: 4vmin;
    animation-delay: 2s; 
    background: linear-gradient(90deg, #D56E4D 0%, #9A46BB 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Random Stars for Fullscreen Views */
.random-star {
    position: absolute;
    font-size: 2rem;
    opacity: 0.7;
    animation: twinkle 3s ease-in-out infinite;
    background: linear-gradient(90deg, #D56E4D 0%, #9A46BB 25.96%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    z-index: -1;
}

/* Watermark Logo */
.ribbon {
    position: fixed;
    bottom: 2%; 
    right: 3%; 
    height: 8vmin;
    width: auto;
    opacity: 1;
    z-index: 1;
}


@keyframes twinkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.6; }
    50% { transform: scale(1.3) rotate(30deg);; opacity: 1; }
}

/* Before/After Illustration */
.hero-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 10px;
    position: relative;
}

.hero-illustration-image {
    width: 40vmin;
    height: 15vh;
    object-fit: contain;
}

/* Main Content */
.main-heading {
    font-size: 4vmin;
    font-weight: 700;
    background: linear-gradient(90deg, #D56E4D 0%, #9A46BB 25.96%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    line-height: 1.1;
}

.subtitle {
    font-size: 1.8vmin;
    color: #140D1C;
    text-align: center;
    margin-bottom: 15px;
    max-width: 90%;
    line-height: 1.6;
}

/* QR Code Section */
.qr-container {
    border-radius: 30px;
    text-align: center;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qr-code {
    width: 20vmin;
    height: 20vmin;
    margin-bottom: 15px;
    border-radius: 15px;
}

.scan-button {
    background: linear-gradient(90deg, #D56E4D 0%, #9A46BB 25.96%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 2vmin;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(236, 72, 153, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.scan-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.4);
}

/* Branding */
.powered-by {
    font-size: 1.5vmin;
    color: #140D1C;
    margin-bottom: 10px;
    font-style: italic;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.voao-logo {
    width: 12vmin;
    height: auto;
}

/* Countdown Display */
.countdown-display {
    position: fixed;
    top: 20px;
    right: 20px;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    display: none;
    align-items: center;
    gap: 8px;
    z-index: 1000;
    font-family: 'Figtree', sans-serif;
    font-weight: 600;
}

.countdown-display.show {
    display: flex !important;
}

.countdown-time {
    font-size: 1.5rem;
    font-weight: bold;
    color: #9A46BB;
}

/* Fullscreen Views */
.fullscreen-view {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 56.25vh; /* 9:16 ratio */
    max-width: 100vw;
    height: 100vh;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to top right, #ffc3a0af, #fec5cf,#fedfe4, #ffebee, #fafafa);
}

.fullscreen-content {
    text-align: center;
    color: white;
    max-width: 90%;
    width: 100%;
    padding: 30px 20px;
}

.waiting-animation {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.waiting-animation h1 {
    font-size: 5vmin;
    font-weight: 700;
    background: linear-gradient(90deg, #D56E4D 0%, #9A46BB 25.96%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 15px 0;
    text-align: center;
    line-height: 1.1;
}

.waiting-animation p {
    text-align: center;
    font-size: 2.2vmin;
    font-weight: 500;
    color: #140D1C;
    margin-bottom: 15px;
}

.waiting-animation .hero-illustration-image {
    width: 50vmin;
    height: auto;
    object-fit: contain;
}

.waiting-text-bubble-wrapper {
    background: linear-gradient(90deg, #D56E4D 0%, #9A46BB 25.96%);
    padding: 2px;
    border-radius: 22px;
    width: fit-content;
    margin: 0 auto;
}

.waiting-text-bubble {
    background: #FFF7F4;
    font-family: 'Figtree', sans-serif;
    font-weight: 400;
    color: #000000;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 2vmin;
}

.upload-icon-large {
    width: 12vmin;
    height: 12vmin;
    animation: float 3s ease-in-out infinite;
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.upload-icon-large img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-illustration {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.waiting-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.waiting-dots span {
    width: 15px;
    height: 15px;
    background: white;
    border-radius: 50%;
    animation: wave 1.4s ease-in-out infinite;
}

.waiting-dots span:nth-child(2) { animation-delay: 0.2s; }
.waiting-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes wave {
    0%, 60%, 100% { transform: scale(1); opacity: 0.5; }
    30% { transform: scale(1.4); opacity: 1; }
}

/* Processing View */
.image-container {
    position: relative;
    max-width: 80vw;
    max-height: 50vh;
    width: auto;
    height: auto;
    margin: 0 auto 2rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wand-icon {
    position: absolute;
    bottom: -2vmin;
    right: -6vmin;
    width: 18vmin;
    height: 18vmin;
    z-index: 10;
    animation: sparkle 2s ease-in-out infinite;
}

.result-wand-icon {
    position: absolute;
    bottom: -2vmin;
    right: -6vmin;
    width: 18vmin;
    height: 18vmin;
    z-index: 10;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(3deg); }
}

.processing-image {
    max-width: 80vw;
    max-height: 50vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 20px;
}

.scanning-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #fec5cf, transparent);
    animation: scanDown 3s ease-in-out infinite;
    box-shadow: 0 0 20px #fec5cf;
}

@keyframes scanDown {
    0% { top: 0; }
    50% { top: calc(100% - 3px); }
    100% { top: 0; }
}

.processing-info {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.processing-info h1 {
    font-size: 5vmin;
    font-weight: 700;
    background: linear-gradient(90deg, #D56E4D 0%, #9A46BB 25.96%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 15px 0;
    text-align: center;
    line-height: 1.1;
}

.processing-info p {
    text-align: center;
    font-size: 2.2vmin;
    font-weight: 500;
    color: #140D1C;
    margin-bottom: 15px;
}

/* Result Page Styles */
.result-actions {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
}

.result-actions h1 {
    font-size: 4vmin;
    font-weight: 700;
    background: linear-gradient(90deg, #D56E4D 0%, #9A46BB 25.96%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 15px 0;
    text-align: center;
    line-height: 1.1;
}

.result-actions p {
    text-align: center;
    font-size: 2vmin;
    font-weight: 500;
    color: #140D1C;
    margin-bottom: 15px;
}

.image-comparison {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    position: relative;
}

.original-section, .transformed-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
}

.transformed-section{
    align-items: flex-end;
}

.result-image-container {
    max-width: 90vw;
    max-height: 30vh;
    width: auto;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-comparison h3{
    font-family: Figtree;
    font-weight: 500;
    font-size: 2.5vmin;
    color:#140D1C;
}

.result-image {
    max-width: 90vw;
    max-height: 30vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 15px;
}

.arrow-icon {
    width: 8vmin;
    height: 8vmin;
    animation: bounceVertical 2s ease-in-out infinite;
    position: relative;
    margin: 1vmin 0;
}

@keyframes bounceVertical {
    0%, 100% { transform: translateY(0) rotate(90deg); }
    50% { transform: translateY(1vmin) rotate(90deg); }
}

.btn {
    background: linear-gradient(90deg, #D56E4D 0%, #9A46BB 25.96%);
    border: none;
    padding: 2vmin 5vmin;
    border-radius: 25px;
    font-size: 2.5vmin;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.3);
    transition: transform 0.2s ease;
    color: white;
    font-family: Figtree;
    text-align: center;
    margin-bottom: 15px;
}

.btn:hover {
    transform: translateY(-3px);
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Responsive - adjust for very wide screens */
@media (min-aspect-ratio: 9/16) {
    body {
        align-items: center;
    }
    
    .container {
        max-height: 100vh;
        height: 100vh;
    }
    
    .fullscreen-view {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Responsive - adjust for very narrow screens */
@media (max-aspect-ratio: 9/16) {
    .container {
        width: 100vw;
        height: 177.78vw; /* 16:9 ratio */
        max-height: none;
    }
    
    .fullscreen-view {
        width: 100vw;
        left: 0;
        transform: none;
    }
}

/* QR Code Placeholder & Wrapper Styles */
.qr-code-wrapper {
    position: relative;
    width: 25vmin;
    height: 25vmin;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.qr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 20px;
}

.qr-placeholder .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #EC4899;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.qr-placeholder p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

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

/* Error Display Styles */
.error-display {
    width: 20vmin;
    height: 20vmin;
    padding: 15px;
    background: rgba(255, 200, 200, 0.2);
    border: 2px solid rgba(255, 100, 100, 0.3);
    border-radius: 15px;
    text-align: center;
    animation: fadeIn 0.3s ease-in;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin: 0 auto 15px;
}

.error-display.hidden {
    display: none !important;
}

.error-display .error-icon {
    font-size: 4vmin;
    margin-bottom: 5px;
}

.error-display h3 {
    margin: 5px 0;
    font-size: 2.5vmin;
    color: #dc2626;
    font-weight: 600;
}

.error-display p {
    margin: 3px 0;
    font-size: 1.8vmin;
    color: #991b1b;
    line-height: 1.2;
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}