/* Arte Gallery - Contemporary Art Gallery Styles */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --gallery-black: #0a0a0a;
    --gallery-dark: #1a1a1a;
    --gallery-gray: #333333;
    --gallery-light: #e8e8e8;
    --gallery-white: #ffffff;
    --gallery-muted: #999999;
    --gallery-accent: #d4af37;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--gallery-black);
    color: var(--gallery-light);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated Gallery Background */
.gallery-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.gallery-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, var(--gallery-black) 0%, rgba(10,10,10,0.2) 80%);
    pointer-events: none;
    z-index: 1;
}

.gallery-wall {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
    animation: scroll-left 60s linear infinite;
    will-change: transform;
}

.gallery-wall:nth-child(even) {
    animation: scroll-right 55s linear infinite;
}

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

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

.gallery-item {
    flex-shrink: 0;
    width: 180px;
    height: 240px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s ease, opacity 0.5s ease;
}

/* Lazy loading states */
.gallery-item img.lazy {
    opacity: 0;
}

.gallery-item img.loaded {
    opacity: 1;
}

.gallery-item.blur img {
    filter: blur(4px);
}

.style-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 32px 12px 12px;
    font-size: 0.7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gallery-white);
    font-weight: 500;
    text-align: center;
}

/* Logo Styles */
.main-logo {
    width: clamp(280px, 50vw, 500px);
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.3));
}

.compact-logo {
    width: clamp(180px, 35vw, 320px);
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.2));
}

#app {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* Pages */
.page {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    text-align: center;
    gap: 24px;
}

.page.active {
    display: flex;
}

#photoPage {
    justify-content: flex-start;
    gap: 16px;
}

/* Gallery Header */
.gallery-header {
    margin-bottom: 40px;
    text-align: center;
    border-bottom: 1px solid var(--gallery-gray);
    padding-bottom: 24px;
    width: 100%;
    max-width: 500px;
}

.gallery-header.compact {
    margin-bottom: 20px;
    padding-bottom: 16px;
}

.gallery-title {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 400;
    letter-spacing: 12px;
    color: var(--gallery-white);
    margin-bottom: 8px;
}

.gallery-subtitle {
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gallery-muted);
    font-weight: 300;
}

/* Typography */
.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-align: center;
    color: var(--gallery-white);
}

.page-subtitle {
    font-size: 1rem;
    font-weight: 300;
    color: var(--gallery-muted);
    max-width: 420px;
    margin: 0 auto 24px;
    padding-bottom: 40px;
    letter-spacing: 0.5px;
}

#photoPage .page-subtitle {
    margin-bottom: 24px;
    padding-bottom: 0;
}

#resultPage .page-subtitle {
    margin-bottom: clamp(64px, 9vw, 120px);
}

.hero-subtitle {
    font-size: 1.15rem;
    letter-spacing: 1px;
}

/* Buttons */
.main-button {
    background: var(--gallery-white);
    color: var(--gallery-black);
    border: none;
    padding: 16px 48px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}

.main-button:hover {
    background: var(--gallery-accent);
    color: var(--gallery-black);
}

.secondary-button {
    background: transparent;
    color: var(--gallery-light);
    border: 1px solid var(--gallery-gray);
    padding: 14px 40px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 2px;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.secondary-button:hover {
    border-color: var(--gallery-white);
    color: var(--gallery-white);
}

/* Camera Section */
.camera-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    padding-top: 0;
}

.camera-frame {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: var(--gallery-dark);
    border: 1px solid var(--gallery-gray);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.camera-screen {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: var(--gallery-black);
    overflow: hidden;
    position: relative;
    border: 2px solid var(--gallery-white);
}

#video,
#capturedImage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#canvas {
    position: absolute;
    inset: 0;
}

#video {
    transform: scaleX(-1);
    -webkit-transform: scaleX(-1);
}

.camera-controls {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.camera-controls button {
    width: 100%;
}

.result-frame {
    max-width: 520px;
}

.result-screen {
    aspect-ratio: 3 / 4;
    width: 100%;
}

/* Art Styles Grid */
.styles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    width: 100%;
    max-width: 900px;
    margin-bottom: 40px;
}

.style-card {
    background: var(--gallery-dark);
    border: 1px solid var(--gallery-gray);
    padding: 32px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.style-card:hover {
    border-color: var(--gallery-white);
    background: var(--gallery-gray);
}

.style-card.selected {
    border-color: var(--gallery-white);
    background: var(--gallery-gray);
    position: relative;
}

.style-card.selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gallery-accent);
}

.style-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gallery-white);
    letter-spacing: 1px;
}

.style-card p {
    font-size: 0.85rem;
    color: var(--gallery-muted);
    line-height: 1.5;
    font-weight: 300;
}

/* Loading */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 2px solid var(--gallery-gray);
    border-top-color: var(--gallery-white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Result */
.result-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    width: 100%;
}

.result-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Email Form */
.email-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 500px;
    background: var(--gallery-dark);
    padding: 32px;
    border: 1px solid var(--gallery-gray);
}

.email-label {
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gallery-muted);
}

.email-input {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    border: 1px solid var(--gallery-gray);
    background: var(--gallery-black);
    color: var(--gallery-white);
    text-align: center;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s ease;
}

.email-input::placeholder {
    color: var(--gallery-muted);
}

.email-input:focus {
    outline: none;
    border-color: var(--gallery-white);
}

.email-status {
    font-size: 0.9rem;
    min-height: 24px;
}

.email-status.success {
    color: #4caf50;
}

.email-status.error {
    color: #f44336;
}

/* Navigation */
.navigation-buttons {
    display: flex;
    gap: 16px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Legal */
.legal-disclaimer {
    margin-top: 40px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--gallery-muted);
}

.legal-link {
    background: none;
    border: none;
    color: var(--gallery-muted);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 5px;
}

.legal-link:hover {
    color: var(--gallery-white);
}

.legal-separator {
    margin: 0 10px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--gallery-dark);
    padding: 40px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--gallery-gray);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: var(--gallery-white);
}

.close-modal:hover {
    color: var(--gallery-accent);
}

/* Email First Page */
.email-first-form {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 40px 32px;
    background: var(--gallery-dark);
    border: 1px solid var(--gallery-gray);
}

.email-input-early {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
    border: 1px solid var(--gallery-gray);
    background: var(--gallery-black);
    color: var(--gallery-white);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.email-input-early::placeholder {
    color: var(--gallery-muted);
}

.email-input-early:focus {
    outline: none;
    border-color: var(--gallery-white);
}

.email-hint {
    font-size: 0.85rem;
    color: var(--gallery-muted);
    margin-top: 16px;
    line-height: 1.6;
    font-weight: 300;
}

/* Email Confirmation Page */
.confirmation-container {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    padding: 40px 20px;
}

.confirmation-icon {
    font-size: 4rem;
    color: var(--gallery-accent);
    margin-bottom: 24px;
    animation: checkmark 0.6s ease-out;
}

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

.confirmation-container .page-subtitle {
    padding-bottom: 0;
    margin-bottom: 20px;
}

.confirmation-container strong {
    color: var(--gallery-white);
    font-weight: 500;
}

.confirmation-hint {
    font-size: 0.9rem;
    color: var(--gallery-muted);
    line-height: 1.7;
    font-weight: 300;
}

/* Checkout Modal Styles */
.checkout-modal .modal-content {
    max-width: 900px;
    padding: 48px;
}

.checkout-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: var(--gallery-white);
    text-align: center;
}

.checkout-subtitle {
    text-align: center;
    color: var(--gallery-muted);
    margin-bottom: 48px;
    font-size: 1rem;
}

.packages-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.package-card {
    background: var(--gallery-black);
    border: 2px solid var(--gallery-gray);
    padding: 40px 32px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.package-card:hover {
    border-color: var(--gallery-white);
    transform: translateY(-4px);
}

.package-best {
    border-color: var(--gallery-accent);
}

.package-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gallery-accent);
    color: var(--gallery-black);
    padding: 6px 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.package-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gallery-muted);
    margin-bottom: 16px;
}

.package-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 24px;
}

.price-euro {
    font-size: 5rem;
    font-weight: 700;
    color: var(--gallery-white);
    line-height: 1;
}

.price-cents {
    font-size: 2rem;
    color: var(--gallery-white);
    margin-left: 4px;
}

.package-description {
    color: var(--gallery-muted);
    font-size: 0.95rem;
    margin-bottom: 28px;
    min-height: 48px;
}

.package-save {
    color: var(--gallery-accent);
    font-weight: 600;
    font-size: 0.9rem;
}

.package-button {
    width: 100%;
    background: var(--gallery-white);
    color: var(--gallery-black);
    border: none;
    padding: 16px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.package-button:hover:not(:disabled) {
    background: var(--gallery-accent);
}

.package-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.package-best .package-button {
    background: var(--gallery-accent);
}

.checkout-info {
    text-align: center;
    color: var(--gallery-muted);
    font-size: 0.85rem;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--gallery-gray);
}

.checkout-info p {
    margin: 8px 0;
}

.free-tier-info {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--gallery-accent);
    padding: 16px;
    margin-top: 24px;
    text-align: center;
}

.free-tier-message {
    color: var(--gallery-accent);
    font-size: 0.9rem;
    margin: 0;
}

/* Credits Badge - floating user info */
.credits-badge {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--gallery-accent);
    color: var(--gallery-black);
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: 700;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.credits-badge .user-email {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.9;
}

.credits-badge .credits-icon {
    font-size: 1.2rem;
}

.credits-badge .credits-text {
    font-size: 1rem;
    font-weight: 700;
}

.credits-badge .logout-btn {
    background: rgba(0, 0, 0, 0.2);
    color: var(--gallery-black);
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.credits-badge .logout-btn:hover {
    background: rgba(0, 0, 0, 0.35);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .credits-badge {
        top: 10px;
        right: 10px;
        padding: 10px 16px;
        gap: 8px;
        font-size: 0.85rem;
    }
    
    .credits-badge .user-email {
        display: none; /* Hide email on mobile for space */
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
    color: var(--gallery-muted);
    margin: 20px 0 40px;
    line-height: 1.8;
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-title {
        font-size: 3rem;
        letter-spacing: 8px;
    }

    .page-title {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 0.95rem;
    }

    .camera-frame {
        padding: 20px;
    }

    .styles-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .navigation-buttons {
        flex-direction: column;
        width: 100%;
    }

    .navigation-buttons button {
        width: 100%;
    }
}
