@font-face {
    font-family: 'PP Editorial Old';
    src: url('./Resources/fonts/PPEditorialOld-UltralightItalic.woff2') format('woff2');
    font-weight: 200;
    font-style: italic;
    font-display: swap;
}

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

body {
    overflow: hidden;
    background: #000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #fff;
    line-height: 1.5;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#gallery-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

#gallery-canvas {
    width: 100%;
    height: 100%;
    cursor: pointer;
    display: block;
    background: #000;
}

#gallery-canvas.hidden {
    pointer-events: none;
}

/* Overlay Elements */
.overlay-container {
    position: fixed;
    bottom: 0; /* Initially at the bottom */
    left: 0;
    right: 0;
    z-index: 100;
    height: fit-content;
    pointer-events: none; /* Allow clicks to pass through the container */
}

/* Background layer for blur and masking - positioned behind content */
.overlay-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1; /* Place behind the content */
    /* Enhanced gradient blur background to match iOS app */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    /* Mask the blur effect - transparent at top, opaque at bottom */
    mask: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(255, 255, 255, 0.5) 30%,
        white 80%,
        white 100%
    );
    -webkit-mask: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(255, 255, 255, 0.5) 30%,
        white 80%,
        white 100%
    );
    /* Black gradient overlay on top of the masked blur */
    background: rgba(0, 0, 0, 0.8);
    pointer-events: none; /* Allow interactions to pass through */
    transition: bottom 0.5s cubic-bezier(0.19, 1, 0.22, 1); /* Add smooth transition */
}

.overlay-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 2rem;
    pointer-events: none; /* Make the div background transparent to clicks */
}

.overlay-header {
    max-width: 400px;
    pointer-events: auto; /* Re-enable clicks for header content */
}

.overlay-header h1 {
    font-family: 'PP Editorial Old', serif;
    font-size: 5rem;
    font-weight: 200;
    font-style: italic;
    letter-spacing: -0.02em;
    line-height: 0.8;
    padding-bottom: 1rem;
}

.overlay-header .tagline {
    font-size: 1rem;
    opacity: 0.7;
    font-weight: 400;
    padding-left: 0.2rem;
    margin-bottom: 0.75rem;
}

.overlay-nav ul {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    gap: 2rem;
    pointer-events: auto; /* Re-enable clicks for navigation */
}

.overlay-nav a {
    color: #fff;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

.overlay-nav a:hover {
    opacity: 1;
}

/* Fullscreen View */
#fullscreen-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1500;
    cursor: pointer;
    overflow: hidden;
}

#fullscreen-view.visible {
    opacity: 1;
}

#fullscreen-view.hidden {
    display: none;
}

#fullscreen-canvas {
    position: absolute;
    object-fit: cover;
    transition: width 0.3s ease, height 0.3s ease;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .overlay-content {
        padding: 0 24px 24px 24px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .overlay-nav ul {
        justify-content: flex-start;
        gap: 24px;
        padding: 0;
    }
    
    .overlay-header {
        max-width: 100%;
    }
    
    .overlay-header h1 {
        font-size: 4rem;
    }
    
    .app-store-badge {
        margin-left: 0;
    }
}

.lut-button {
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
}

.lut-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.lut-button.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.lut-controls {
    margin-top: 1rem;
}

.lut-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    min-width: 200px;
}

.lut-select:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.lut-select option {
    background: #000;
    color: white;
} 

#vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Ensure vignette doesn't block interactions */
    background: radial-gradient(
        circle at center,
        transparent 30%,
        rgba(0, 0, 0, 0.6) 100%
    );
    z-index: 50;
} 

.lut-selector {
    height: 0;
    padding: 0;
    overflow: hidden;
    /* Initially hidden - no height and opacity 0 */
    opacity: 0;
    position: relative;
    z-index: 1; /* Ensure LUT selector appears above the blur overlay */
    transition: height 0.5s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.3s ease;
    pointer-events: auto; /* Re-enable pointer events for LUT selector */
    /* Remove fixed positioning and background since it's now inside overlay-container */
}

.lut-selector.visible {
    /* When visible class is added, expand to full height and fade in */
    height: 100px;
    opacity: 1;
}

.lut-selector-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;  /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
    cursor: grab;
}

.lut-selector-scroll:active {
    cursor: grabbing;
}

.lut-selector-scroll.dragging {
    cursor: grabbing;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.lut-selector-scroll::-webkit-scrollbar {
    display: none;  /* Chrome, Safari, Opera */
}

.lut-selector-container {
    display: flex;
    align-items: center;
    padding: 12px calc(50vw - 46.22px);  /* Half viewport width minus half item width */
    gap: 20px;
    min-width: max-content;  /* Ensure container can grow beyond viewport */
}

.lut-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 92.44px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.lut-preview:active {
    transform: scale(0.92);
}

.lut-preview img {
    width: 92.44px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.lut-preview:hover img {
    border-color: #FFD700;
}

.lut-preview.selected img {
    border: 2px solid white;
}

.lut-preview.selected:hover img {
    border-color: white;
}

.lut-name {
    font-family: ui-monospace, "SF Mono", monospace;
    font-size: 10px;
    color: #808080;
    text-transform: uppercase;
    transition: color 0.2s ease;
    width: 92.44px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lut-preview.selected .lut-name {
    color: white;
}

.lut-tooltip {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    color: #f7ce46;
    text-transform: uppercase;
    opacity: 0;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 2001;
}

.lut-tooltip.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Manage and Create buttons */
.lut-action-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 92.44px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.lut-action-button:active {
    transform: scale(0.92);
}

.lut-action-button .icon-container {
    width: 92.44px;
    height: 52px;
    background: rgba(128, 128, 128, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.lut-action-button:hover .icon-container {
    border-color: #FFD700;
}

.lut-action-button .icon {
    font-size: 24px;
    color: #FFD700;
}

.lut-action-button .label {
    font-family: ui-monospace, "SF Mono", monospace;
    font-size: 10px;
    color: white;
    text-transform: uppercase;
}

.app-store-badge {
    height: 32px;
    width: auto;
    display: block;
    margin-left: 0.2rem;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.app-store-badge:hover {
    opacity: 1;
}

.badge-container {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 1rem;
}

.one-time-badge {
    height: 32px;
    width: 120px;
    background: #000;
    border: 1px solid #eac342e1;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4px 12px;
    transition: all 0.2s ease;
    opacity: 0.9;
    text-decoration: none;
    cursor: pointer;
}

.one-time-badge:hover {
    opacity: 1;
    text-decoration: none;
}

.one-time-badge .subtitle {
    color: #eac342c9;
    font-size: 7px;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1;
    margin-bottom: 2px;
    text-align: center;
}

.one-time-badge .title {
    color: #eac342;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.feature-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 20000;
    display: flex;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 40px 20px;
}

/* Safari-specific fix for backdrop-filter opacity issue - About modal only */
.safari-backdrop-fix #about-modal {
    background: transparent;
}

/* Separate backdrop element for Safari */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 19999;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-backdrop.visible {
    opacity: 1;
    visibility: visible;
}

.feature-modal.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    margin: auto;
    width: 100%;
    max-width: 500px;
    background: rgba(0, 0, 0, 0.95);
    color: #fff;
    position: relative;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                opacity 0.3s ease;
}

.feature-modal.visible .modal-content {
    transform: scale(1);
    opacity: 1;
}

@media (max-width: 768px) {
    .feature-modal {
        padding: 0;
        align-items: flex-end;
    }
    
    .modal-content {
        min-height: 100%;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        transform: translateY(100%);
        transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .feature-modal.visible .modal-content {
        transform: translateY(0);
    }
}

.modal-header {
    position: relative;
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    /*margin-bottom: 24px;*/
}

#manage-modal .modal-header {
    background-image: url('Resources/images/alarice-c9Mh7dPglqE-unsplash.webp');
}

#create-modal .modal-header {
    background-image: url('Resources/images/yueying-sun-KPtkQAlsqQ0-unsplash.webp');
}

#about-modal .modal-header {
    background-image: url('Resources/images/upgrade.webp');
}

#pricing-modal .modal-header {
    background-image: url('Resources/images/vladyslav-tobolenko-r3NWJTdY-IU-unsplash.webp');
}


.modal-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
    z-index: 1;
}

.modal-header-content {
    position: absolute;
    z-index: 2;
    height: 100%;
    display: flex;
    padding: 24px;
    flex-direction: column;
    justify-content: flex-end;
}

.modal-header h1 {
    font-family: 'PP Editorial Old', serif;
    font-size: 72px;
    font-weight: 200;
    font-style: italic;
    letter-spacing: -0.02em;
    line-height: 0.8;
    /*padding-bottom: 2rem;*/
    color: #fff;
}

.modal-tagline {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.8);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.description {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 24px;
}

.description p {
    font-size: 17px;
    color: #808080;
    font-weight: 400;
    line-height: 1.5;
}

.features {
    padding: 32px 0;
}

.features h2 {
    font-family: 'PP Editorial Old', serif;
    font-size: 32px;
    font-weight: 200;
    font-style: italic;
    margin-bottom: 32px;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.feature-row span {
    font-size: 17px;
    color: #fff;
    white-space: nowrap;
}

.feature-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
}

.modal-close {
    position: fixed;
    top: 4px;
    right: 4px;
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
}

.modal-close::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 16px;
    background: rgba(127, 127, 127, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.2s ease;
}

.modal-close img {
    position: relative;
    width: 16px;
    height: 16px;
    z-index: 1;
    color: white;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.modal-close:hover img {
    opacity: 1;
}

.modal-close:active::before {
    transform: scale(0.92);
}

.modal-close-icon {
    width: 16px;
    height: 16px;
    color: white;
    z-index: 3;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.modal-close-icon:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .modal-close {
        position: fixed;
        top: env(safe-area-inset-top, 4px);
        right: env(safe-area-inset-right, 4px);
    }
    
    .modal-content {
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .modal-header h1 {
        font-size: 48px;
    }
    
    .modal-body {
        flex: 1;
    }
} 

.action-icon {
    width: 24px;
    height: 24px;
    color: #FFD700;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.lut-action-button:hover .action-icon {
    opacity: 1;
}

.lut-action-button .icon-container {
    width: 92.44px;
    height: 52px;
    background: rgba(128, 128, 128, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
} 

.legal-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    color: #fff;
    min-height: 100vh;
}

body.legal-body {
    overflow-y: auto;
    background: #000;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

.legal-header {
    margin-bottom: 60px;
}

.legal-header h1 {
    font-family: 'PP Editorial Old', serif;
    font-size: 72px;
    font-weight: 200;
    font-style: italic;
    letter-spacing: -0.02em;
    line-height: 0.8;
    margin-bottom: 16px;
}

.legal-tagline {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.6);
}

.legal-content section {
    margin-bottom: 48px;
}

.legal-content a {
    color: white;
    text-decoration: underline;
}

.legal-content h2 {
    font-family: 'PP Editorial Old', serif;
    font-size: 32px;
    font-weight: 200;
    font-style: italic;
    margin-bottom: 16px;
    color: #FFD700;
}

.legal-content h3 {
    font-size: 20px;
    font-weight: 500;
    margin: 24px 0 12px;
    color: #FFD700;
}

.legal-content p {
    font-size: 17px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 16px;
}

.legal-content ul {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.legal-content li {
    font-size: 17px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    padding-left: 24px;
    position: relative;
    margin-bottom: 8px;
}

.legal-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #FFD700;
}

.legal-footer {
    margin-top: 60px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.back-link {
    color: #FFD700;
    text-decoration: none;
    font-size: 17px;
    transition: opacity 0.2s ease;
}

.back-link:hover {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .legal-header h1 {
        font-size: 48px;
    }
    
    .legal-content h2 {
        font-size: 24px;
    }
} 

.feature-request-body {
    flex: 1;
    min-height: 700px;
    position: relative;
}

.feature-request-body iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
} 

.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

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

.plain-terms {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 48px;
}

.plain-terms-section {
    margin-bottom: 24px;
}

.plain-terms-section:last-child {
    margin-bottom: 0;
}

.plain-terms h3 {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: #FFD700;
    margin-bottom: 8px;
}

.plain-terms p {
    font-size: 15px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

.terms-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 48px 0;
} 

.modal-cta {
    text-align: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 24px;
}

.modal-cta .app-store-badge {
    height: 48px;
    width: auto;
    display: inline-block;
    transition: opacity 0.2s ease;
}

.modal-cta .app-store-badge:hover {
    opacity: 0.9;
} 

.legal-content h2,
.plain-terms h2 {
    font-family: 'PP Editorial Old', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 32px;
    font-weight: 300;
    font-style: italic;
    margin: 48px 0 24px;
}

.plain-terms h2 {
    margin-top: 0;
} 

.video-container {
    width: 65%;
    max-width: 800px;
    margin: 0 auto 24px;
    position: relative;
    padding-top: calc(65% * (16 / 9));
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
} 

/* Layout Settings */
.layout-settings-btn {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.layout-settings-btn:hover {
    transform: scale(1.05);
    background: rgba(0, 0, 0, 0.7);
}

.layout-settings-btn.active {
    background: rgba(0, 0, 0, 0.8);
    border-color: #f7ce46;
}

.layout-settings-btn img {
    width: 24px;
    height: 24px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.layout-settings-btn:hover img,
.layout-settings-btn.active img {
    opacity: 1;
}

.layout-settings-panel {
    position: fixed;
    top: 80px;
    right: 24px;
    width: 300px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 16px;
    z-index: 10001;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease, height 0.3s ease;
}

.layout-settings-panel.visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.layout-settings-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.layout-settings-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: height 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
}

.layout-control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: ui-monospace, "SF Mono", monospace;
    font-size: 11px;
    color: #fff;
}

.layout-control-value {
    color: #f7ce46;
}

.layout-settings-types {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 16px;
}

.layout-type-button {
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.layout-type-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.layout-type-button.active {
    background: rgba(255, 255, 255, 0.1);
}

.layout-type-button img {
    width: 24px;
    height: 24px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.layout-type-button:hover img,
.layout-type-button.active img {
    opacity: 1;
}

.layout-type-button.active img {
    color: #f7ce46;
}

.layout-type-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: transparent;
    transition: all 0.2s ease;
}

.layout-type-button.active::after {
    background: #f7ce46;
}

/* Aspect ratio selector */
.aspect-ratio-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.aspect-ratio-button {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.aspect-ratio-preview {
    width: 60px;
    height: auto;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.aspect-ratio-button.selected .aspect-ratio-preview {
    border-color: #f7ce46;
}

.aspect-ratio-button:hover .aspect-ratio-preview {
    background: rgba(255, 255, 255, 0.2);
}

.aspect-ratio-button span {
    font-family: ui-monospace, "SF Mono", monospace;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s ease;
}

.aspect-ratio-button.selected span {
    color: #f7ce46;
}

/* Slider styles */
.layout-slider-container {
    padding: 0 8px;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.layout-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    border-radius: 2px;
}

.layout-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.layout-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.layout-slider::-webkit-slider-thumb:hover,
.layout-slider:active::-webkit-slider-thumb {
    background: #f7ce46;
    transform: scale(1.1);
}

.layout-slider::-moz-range-thumb:hover,
.layout-slider:active::-moz-range-thumb {
    background: #f7ce46;
    transform: scale(1.1);
}

/* CSS variable for layout settings */
:root {
    --image-border-radius: 0px;
    --gallery-border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .layout-settings-btn {
        top: 16px;
        right: 16px;
        width: 32px;
        height: 32px;
    }
    
    .layout-settings-btn img {
        width: 16px;
        height: 16px;
    }
    
    .layout-settings-panel {
        top: 60px;
        right: 16px;
        width: calc(100% - 32px);
        max-width: 300px;
    }
}

/* Apply border radius to the gallery items */
.gallery-item {
    border-radius: var(--gallery-border-radius);
    overflow: hidden;
}

/* LUT Loading States */
.lut-preview.skeleton {
    position: relative;
}

.lut-preview.skeleton img {
    opacity: 0; /* Hide the actual image when in skeleton state */
}

.lut-preview.skeleton::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 92.44px;
    height: 52px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    animation: skeletonPulse 2s ease-in-out infinite;
    z-index: 10;
}

@keyframes skeletonPulse {
    0%, 100% { 
        opacity: 0.3; 
    }
    50% { 
        opacity: 0.6; 
    }
}

.lut-preview.loading {
    position: relative;
}

.lut-preview.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10;
    border-radius: 8px;
}

.lut-preview.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #f7ce46;
    animation: spin 1s ease-in-out infinite;
    z-index: 11;
}

.lut-preview.error {
    position: relative;
}

.lut-preview.error::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10;
    border-radius: 8px;
}

.lut-preview.error::after {
    content: '!';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    color: #ff3b30;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    line-height: 24px;
    z-index: 11;
}

.lut-preview.loaded img {
    border: 2px solid transparent;
    transition: all 0.3s ease;
    opacity: 1; /* Ensure loaded images are visible */
    object-fit: cover; /* Set images to cover as requested */
}

.lut-preview.loaded.selected img {
    border: 2px solid white;
}

.lut-preview.loaded:not(.selected):hover img {
    border-color: #f7ce46;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
} 

/* Styles for Legal Modals */
.legal-content-modal {
    padding: 0; /* Remove padding as iframe handles scrolling */
    overflow-y: hidden; /* Let iframe handle scroll */
    height: 70vh; /* Adjust height as needed */
    max-height: 700px; /* Optional max height */
}

.feature-modal iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block; /* Remove potential inline spacing */
}

/* Styles for when legal pages are loaded in an iframe */
.iframe-mode .legal-header {
    padding: 3rem 2rem 2rem 2rem; /* Adjust padding */
    background: #1a1a1a; /* Slightly different background */
    margin-bottom: 20px;
}

.iframe-mode .legal-page {
    padding: 0px; /* Adjust padding */
}

.iframe-mode .legal-content {
    padding: 1rem 2rem 2rem 2rem; /* Adjust content padding */
}

.iframe-mode .back-link {
    display: none; /* Hide back link in iframe mode */
}

.iframe-mode .legal-footer {
    display: none; /* Hide footer in iframe mode */
}

/* Ensure legal body has background in iframe */
.iframe-mode.legal-body {
    background: #111; /* Match modal content background or desired color */
}

.iframe-mode .open-new-window {
    display: block; /* Changed from none to block when in iframe mode */
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    font-size: 14px;
    color: #FFD700; /* Match other link colors */
    text-decoration: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* Add a separator */
}

.iframe-mode .open-new-window:hover {
    opacity: 0.8;
}

.open-new-window {
    display: none; /* Hidden by default */
}

/* Tutorial Modal Styles */
.tutorial-modal-content {
    width: min(500px, 90vw);
    aspect-ratio: 9/16;
    max-height: 90vh;
    padding: 0;
    overflow: hidden;
    background: #000;
    /* Ensure the aspect ratio is strictly maintained on desktop */
    box-sizing: border-box;
    /* Add animation properties like other modals */
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                opacity 0.3s ease;
}

/* Animate in when visible - desktop */
.feature-modal.visible .tutorial-modal-content {
    transform: scale(1);
    opacity: 1;
}

.tutorial-content {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Asset layer for fullscreen tutorial */
.tutorial-asset-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.tutorial-asset-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.tutorial-asset-wrapper.active {
    opacity: 0.3;
}

.tutorial-asset-wrapper.active.ready {
    opacity: 1;
}

/* Loading state for tutorial assets */
.tutorial-asset-wrapper[data-loading="true"] {
    background: linear-gradient(45deg, #1a1a1a, #2a2a2a, #1a1a1a);
    background-size: 400% 400%;
    animation: shimmer 2s ease-in-out infinite;
}

.tutorial-asset-wrapper[data-loading="true"].active {
    opacity: 0.4;
}

/* Transitioning out of loading state */
.tutorial-asset-wrapper.loading-complete {
    background: none;
    animation: none;
    transition: background 0.3s ease, opacity 0.5s ease;
}

/* Enhanced shimmer animation */
@keyframes shimmer {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.tutorial-video,
.tutorial-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

/* Video/image fade-in when loaded */
.tutorial-asset-wrapper.ready .tutorial-video,
.tutorial-asset-wrapper.ready .tutorial-image {
    opacity: 1;
}

/* Progress bars at top */
.tutorial-progress-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding-top: 20px;
}

.tutorial-progress-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: -1;
}

.tutorial-progress-bars {
    display: flex;
    gap: 4px;
    padding: 0 16px;
    position: relative;
    z-index: 1;
}

.tutorial-progress-bar {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.tutorial-progress-fill {
    height: 100%;
    background: #fff;
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 2px;
}

.tutorial-progress-bar.past .tutorial-progress-fill {
    width: 100%;
}

.tutorial-progress-bar.future .tutorial-progress-fill {
    width: 0%;
}

/* Text overlay at bottom */
.tutorial-text-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 5;
    padding: 24px;
    padding-top: 100px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 1));
}

/* Blur layer positioned inside text overlay */
.tutorial-blur-layer {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: -1;
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    mask: linear-gradient(transparent, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 1));
    -webkit-mask: linear-gradient(transparent, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 1));
}

.tutorial-blur-layer.splash-style {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100px;
    top: auto;
    z-index: -1;
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    mask: 
        linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.8) 70%, rgba(0, 0, 0, 1) 100%),
        radial-gradient(
            circle at center,
            rgba(0, 0, 0, 0.6) 0%,
            rgba(0, 0, 0, 0.3) 50%,
            transparent 100%
        );
    -webkit-mask: 
        linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.8) 70%, rgba(0, 0, 0, 1) 100%),
        radial-gradient(
            circle at center,
            rgba(0, 0, 0, 0.6) 0%,
            rgba(0, 0, 0, 0.3) 50%,
            transparent 100%
        );
}

.tutorial-text-overlay.splash-style {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    background: 
        linear-gradient(transparent, transparent, transparent, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 1)),
        radial-gradient(
            circle at center,
            rgba(0, 0, 0, 0.6) 0%,
            rgba(0, 0, 0, 0.3) 50%,
            transparent 100%
        );
    text-align: center;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.tutorial-text-content {
    position: relative;
    z-index: 1;
    margin-bottom: 24px;
    opacity: 1;
    transition: opacity 0.25s ease-in-out;
}

.tutorial-text-content.fading {
    opacity: 0;
}

.tutorial-text-overlay.splash-style .tutorial-text-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
}

/* Tutorial title */
.tutorial-title {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 28px;
    font-weight: bold;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: white;
    margin-bottom: 12px;
    text-align: center;
}

.tutorial-title.splash-title {
    font-family: 'PP Editorial Old', serif;
    font-size: 72px;
    font-weight: 200;
    font-style: italic;
    letter-spacing: -0.02em;
    line-height: 0.8;
    margin-bottom: 0;
}

.tutorial-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    white-space: pre-line;
    text-align: center;
}

/* Navigation tap areas */
.tutorial-nav-areas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    pointer-events: none;
}

.tutorial-nav-left,
.tutorial-nav-right {
    height: calc(100% - 70px); /* Exclude bottom 100px for button area */
    cursor: pointer;
    pointer-events: auto;
    /* Debug borders - remove in production */
    /* border: 1px solid rgba(255, 0, 0, 0.2); */
}

.tutorial-nav-left {
    flex: 0 0 30%;
    /* Left side for previous */
}

.tutorial-nav-right {
    flex: 1;
    /* Right side for next - takes up remaining space */
}

/* Main action button */
.tutorial-button-container {
    position: relative;
    margin-top: 16px;
    width: 100%;
}

.tutorial-button {
    width: 100%;
    height: 42px;
    background: linear-gradient(135deg, #FFD700 0%, #FFC000 100%);
    color: #000;
    border: none;
    padding: 0 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tutorial-button-icon {
    width: 16px;
    height: 16px;
    color: #000;
    flex-shrink: 0;
}

.tutorial-button-text {
    opacity: 1;
    transition: opacity 0.25s ease-in-out;
}

.tutorial-button-text.fading {
    opacity: 0;
}

.tutorial-button:hover {
    background: linear-gradient(135deg, #FFC000 0%, #FFB000 100%);
}

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

/* Tutorial modal close button */
.tutorial-modal-close {
    position: fixed;
    top: 30px;
    right: 4px;
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
}

.tutorial-modal-close::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 16px;
    background: rgba(127, 127, 127, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.2s ease;
}

.tutorial-modal-close img {
    position: relative;
    width: 16px;
    height: 16px;
    z-index: 1;
    color: white;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.tutorial-modal-close:hover img {
    opacity: 1;
}

.tutorial-modal-close:active::before {
    transform: scale(0.92);
}

/* Desktop-specific adjustments for strict 9:16 aspect ratio */
@media (min-width: 769px) {
    .tutorial-modal-content {
        width: auto;
        height: 90vh;
        aspect-ratio: 9/16;
        /* For 9:16 aspect ratio: height = width * (16/9) */
        min-width: 420px;
        max-width: min(calc(500px * 16/9), 90vw);
        border-radius: 20px;
        /* Force strict aspect ratio enforcement */
        flex-shrink: 0;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tutorial-modal-content {
        width: 100vw;
        height: 100dvh;
        max-width: 100vw;
        max-height: 100dvh;
        border-radius: 0;
        aspect-ratio: auto;
        /* Add mobile slide-up animation like other modals */
        transform: translateY(100%);
        transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    /* Animate in when visible - mobile */
    .feature-modal.visible .tutorial-modal-content {
        transform: translateY(0);
        opacity: 1;
    }
    
    .tutorial-content {
        width: 100%;
        height: 100dvh;
    }
    
    .tutorial-title {
        font-size: 24px;
    }
    
    .tutorial-description {
        font-size: 15px;
    }
    
    .tutorial-text-overlay {
        padding: 24px;
    }
    
    .tutorial-text-overlay.splash-style {
        padding: 24px;
        max-width: 100%;
    }
}

/* Markdown Content Styles */
.about-modal-body {
    padding: 0;
    overflow-y: auto;
    max-height: 100%;
}

.markdown-container {
    padding: 0 16px 72px 16px;
    color: white; /* Ensure text is visible */
}

.markdown-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 100%;
    line-height: 1.5;
    color: white; /* Ensure text is visible */
}

.markdown-content h1 {
    margin: 0;
    padding-bottom: 8px;
}

.markdown-content h2 {
    margin: 0;
    padding-bottom: 4px;
}

.markdown-content h3 {
    margin: 0;
    padding-bottom: 2px;
}

.markdown-content p {
    margin: 0;
}

.markdown-feature-list {
    margin: 0;
}

.markdown-bullet-list {
    margin: 0;
}

.markdown-quote {
    margin: 8px 0;
}

.markdown-media {
    margin: 8px 0;
}

.markdown-divider {
    margin: 8px 0;
}

/* Responsive adjustments for markdown */
@media (max-width: 768px) {
    .markdown-container {
        padding: 0 16px 72px 16px;
    }
    
    .markdown-content {
        gap: 20px;
    }
    
    .markdown-content h1 {
        font-size: 28px !important;
    }
    
    .markdown-content h2 {
        font-size: 24px !important;
    }
    
    .markdown-content h3 {
        font-size: 20px !important;
    }
} 