/* Reset and global styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    display: flex;
    min-height: 100vh;
    background-color: #fafafa;
    color: #333;
    overflow-y: auto;
}

/* Sidebar styles - UPDATED: only Home and Explore */
.sidebar {
    width: 80px;
    background-color: white;
    border-right: 1px solid #eaeaea;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    box-shadow: 1px 0 5px rgba(0, 0, 0, 0.03);
    z-index: 10;
}

.logo {
    width: 32px;
    height: 32px;
    margin-bottom: 30px;
    color: #111;
}

.nav-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    color: #666;
    text-decoration: none;
    font-size: 11px;
    position: relative;
    transition: all 0.2s ease;
}

.nav-item.active {
    color: #111;
    background-color: #f8f8f8;
}

.nav-item:hover {
    background-color: #f5f5f5;
}

.nav-icon {
    font-size: 18px;
    margin-bottom: 5px;
}

/* Main content styles */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 40px;
    padding-top: 80px;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    min-height: 100vh;
}

.page-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    color: #222;
}

/* Content layout */
.content-layout {
    display: flex;
    gap: 24px;
}

.left-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.right-section {
    width: 340px;
    flex-shrink: 0;
}

/* Prompt area styles */
.prompt-container {
    display: flex;
    flex-direction: column;
    background-color: white;
    border-radius: 16px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    border: 1px solid #eaeaea;
    transition: all 0.2s ease;
}

.prompt-label {
    padding: 16px 20px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    background-color: white;
}

.prompt-input {
    flex: 1;
    padding: 0 20px 16px;
    border: none;
    font-size: 15px;
    resize: none;
    outline: none;
    min-height: 100px;
    line-height: 1.6;
    color: #333;
    background-color: transparent;
}

.prompt-input::placeholder {
    color: #999;
}

.negative-prompt-container {
    margin-bottom: 12px;
}

.negative-prompt-container .prompt-label {
    color: #666;
}

#negative-prompt {
    min-height: 80px;
}

/* Style options */
.style-options {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 4px;
    margin-bottom: 16px;
    scrollbar-width: none;
}

.style-options::-webkit-scrollbar {
    display: none;
}

.style-option {
    padding: 8px 16px;
    border: 1px solid #eaeaea;
    border-radius: 24px;
    background-color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.15s ease;
    color: #666;
}

.style-option.active {
    background-color: #000;
    border-color: #000;
    color: white;
}

.style-option:hover:not(.active) {
    border-color: #ddd;
    background-color: #fafafa;
}

.style-icon {
    margin-right: 8px;
    font-size: 14px;
    opacity: 0.8;
}

/* Upgrade buttons container */
.upgrade-buttons-container {
    position: absolute;
    top: 24px;
    right: 40px;
    display: flex;
    flex-direction: row;
    gap: 16px;
    z-index: 10;
}

/* Upgrade button */
.upgrade-btn {
    background-color: #fff0f0;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
    border-radius: 24px;
    padding: 8px 18px;
    font-size: 13px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
}

.btn-text {
    display: inline-block;
}

.upgrade-btn:hover {
    background-color: #ffe7e7;
    border-color: #ffb3b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 77, 79, 0.2);
}

.lahgen-btn {
    background-color: #fff0f0;
    color: #ff4d4f;
    border-color: #ffccc7;
}

.purchase-btn {
    background-color: #f0f5ff;
    color: #4d79ff;
    border-color: #c7d6ff;
}

.purchase-btn:hover {
    background-color: #e7efff;
    border-color: #b3c6ff;
    box-shadow: 0 2px 8px rgba(77, 121, 255, 0.2);
}

.upgrade-icon {
    margin-right: 6px;
}

/* Settings panel styles */
.settings-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 28px;
    background-color: white;
    border-radius: 20px;
    border: 1px solid #eaeaea;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.settings-panel:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.setting-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.setting-label {
    display: flex;
    align-items: center;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    gap: 6px;
    padding-left: 2px;
}

.info-icon {
    margin-left: 6px;
    font-size: 14px;
    color: #999;
    cursor: help;
    transition: all 0.2s ease;
}

.info-icon:hover {
    color: #666;
    transform: translateY(-1px);
}

.setting-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.dropdown-control {
    position: relative;
    width: 100%;
}

.dropdown-select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #eaeaea;
    background-color: white;
    border-radius: 14px;
    appearance: none;
    font-size: 14px;
    cursor: pointer;
    color: #333;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.dropdown-select:hover {
    border-color: #ddd;
    background-color: #fafafa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.dropdown-select:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.dropdown-arrow {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #666;
    font-size: 12px;
    transition: all 0.2s ease;
}

.dropdown-select:hover + .dropdown-arrow {
    transform: translateY(-50%) translateY(-2px);
    color: #333;
}

/* Toggle group styles */
.toggle-group {
    display: flex;
    background-color: #f5f5f5;
    border-radius: 14px;
    padding: 4px;
    gap: 4px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
    width: 100%;
}

.toggle-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    border-radius: 12px;
    color: #666;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.toggle-btn.active {
    background-color: white;
    color: #111;
    font-weight: 500;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.toggle-btn:not(.active):hover {
    background-color: rgba(255, 255, 255, 0.5);
    color: #333;
}

/* Generate button */
.generate-btn {
    background-color: #111;
    color: white;
    border: none;
    border-radius: 16px;
    padding: 18px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
}

.generate-btn:hover {
    background-color: #000;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.generate-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.generate-btn i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.generate-btn:hover i {
    transform: rotate(180deg);
}

/* Result container styles */
#result-container {
    margin-top: 20px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    display: none;
}

#result-container img {
    width: 100%;
    display: block;
    pointer-events: auto;
}

#result-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f8f8f8;
    border-radius: 12px;
    border: 1px dashed #ddd;
    padding: 60px 20px;
    text-align: center;
    color: #888;
}

#result-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

#result-placeholder h3 {
    font-weight: 500;
    margin-bottom: 8px;
}

#result-placeholder p {
    font-size: 14px;
    max-width: 300px;
}

/* Enhanced loading animation */
#loading-animation {
    display: none;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    border: 1px solid #eaeaea;
    padding: 60px 20px;
    min-height: 400px;
    text-align: center;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.spinner-container {
    position: relative;
    width: 140px;
    height: 140px;
    animation: float 3s ease-in-out infinite;
}

.spinner-outer {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: #111;
    border-right-color: #111;
    border-radius: 50%;
    animation: spin 3s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.1));
}

.spinner-inner {
    position: absolute;
    top: 15%;
    left: 15%;
    width: 70%;
    height: 70%;
    border: 4px solid transparent;
    border-top-color: #666;
    border-right-color: #666;
    border-radius: 50%;
    animation: spin 2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite reverse;
}

.spinner-center {
    position: absolute;
    top: 30%;
    left: 30%;
    width: 40%;
    height: 40%;
    border: 4px solid transparent;
    border-top-color: #999;
    border-right-color: #999;
    border-radius: 50%;
    animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.generating-dots {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 6px;
}

.generating-dots span {
    width: 8px;
    height: 8px;
    background-color: #111;
    border-radius: 50%;
    animation: dots 1.5s infinite;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.2));
}

.loading-text {
    text-align: center;
}

.loading-text h3 {
    font-size: 20px;
    font-weight: 600;
    color: #111;
    margin-bottom: 20px;
    animation: glow 2s infinite;
}

.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 20px;
}

.step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #999;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0.5;
    padding: 10px 18px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.03);
    transform: translateX(0);
}

.step.active {
    color: #111;
    opacity: 1;
    background: rgba(0, 0, 0, 0.05);
    transform: translateX(12px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.step.active i {
    animation: bounce 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

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

@keyframes glow {
    0%, 100% { text-shadow: 0 0 5px rgba(0, 0, 0, 0.1); }
    50% { text-shadow: 0 0 15px rgba(0, 0, 0, 0.2); }
}

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

@keyframes dots {
    0%, 100% { transform: translateY(0); opacity: 0.3; scale: 0.8; }
    50% { transform: translateY(-12px); opacity: 1; scale: 1.2; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-6px) scale(1.2); }
}

/* Gallery section */
#gallery-section {
    margin-top: 60px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #222;
}

#gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.gallery-item {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #eaeaea;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

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

.gallery-item:hover img {
    transform: scale(1.03);
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 16px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item-actions {
    display: flex;
    gap: 8px;
}

.gallery-action-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: all 0.2s ease;
}

.gallery-action-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Divider */
.divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #eaeaea 20%, #eaeaea 80%, transparent);
    margin: 20px 0;
}

/* Responsive design */
@media (max-width: 968px) {
    .content-layout {
        flex-direction: column;
    }
    
    .right-section {
        width: 100%;
    }
}

/* Shake animation for empty prompt */
.shake {
    animation: shake 0.65s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Model picker styles */
.model-picker {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.model-card {
    flex: 1;
    background: white;
    border: 1px solid #eaeaea;
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border: 2px solid #ffffff;
}

.model-card.active {
    border: 2px solid #000;
    background: white;
}

.model-card:hover:not(.active) {
    border-color: #ddd;
    background: #fafafa;
}

.model-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    color: #111;
}

.model-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.model-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ff4d4f;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* Advanced options styles */
.advanced-options {
    background: white;
    border-radius: 16px;
    border: 1px solid #eaeaea;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.advanced-options:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.advanced-header {
    padding: 18px 24px;
    border-bottom: 1px solid #eaeaea;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fafafa;
    transition: all 0.2s ease;
}

.advanced-header:hover {
    background-color: #f5f5f5;
}

.advanced-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.advanced-header i {
    color: #666;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.advanced-content {
    padding: 24px;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.advanced-content.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.option-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.option-row:last-child {
    margin-bottom: 0;
}

.option-label {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 2px;
}

.option-input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #eaeaea;
    border-radius: 14px;
    font-size: 14px;
    background-color: white;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.option-input:hover {
    border-color: #ddd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.option-input:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Add these new styles */
.result-image-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.result-actions {
    display: flex;
    gap: 8px;
    padding: 16px;
    background: white;
    border-top: 1px solid #eaeaea;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    background: white;
    color: #333;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #f5f5f5;
    border-color: #ddd;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    animation: fadeInOut 3s ease;
    z-index: 1000;
}

.toast.success {
    background: rgba(0, 0, 0, 0.8);
    color: white;
}

.toast.error {
    background: rgba(255, 0, 0, 0.8);
    color: white;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; transform: translate(-50%, 20px); }
    10%, 90% { opacity: 1; transform: translate(-50%, 0); }
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 60px;
        flex-direction: row;
        justify-content: space-around;
        padding: 0;
        z-index: 100;
    }

    .logo {
        display: none;
    }

    .nav-item {
        flex-direction: column;
        padding: 8px 0;
        font-size: 10px;
    }

    .nav-icon {
        margin-bottom: 2px;
    }

    .main-content {
        padding: 20px;
        padding-top: 40px;
        padding-bottom: 80px;
    }

    .content-layout {
        flex-direction: column;
    }

    .right-section {
        width: 100%;
    }

    .page-title {
        margin-top: 20px;
        font-size: 28px;
    }

    .upgrade-buttons-container {
        position: static;
        top: auto;
        right: auto;
        flex-direction: column;
        gap: 10px;
        margin: 0 auto 20px;
        width: 100%;
        max-width: 300px;
    }

    .upgrade-btn {
        width: 100%;
        justify-content: center;
        padding: 10px;
        font-size: 12px;
        min-height: 44px;
        border-radius: 22px;
    }

    .model-picker {
        flex-direction: column;
        gap: 12px;
    }

    .model-card {
        padding: 16px;
    }

    .style-options {
        padding: 0;
        margin: 16px 0;
    }

    .prompt-container {
        margin-bottom: 12px;
    }

    .prompt-label {
        padding: 12px 16px 8px;
    }

    .prompt-input {
        padding: 0 16px 16px;
        min-height: 80px;
    }
}

/* Explore page styles */
.explore-header {
    margin-bottom: 32px;
}

.explore-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    gap: 16px;
}

.filter-group {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    background: white;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    border-color: #ddd;
    background: #fafafa;
}

.filter-btn.active {
    background: #111;
    border-color: #111;
    color: white;
}

.view-options {
    display: flex;
    gap: 8px;
}

.view-btn {
    padding: 8px;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    background: white;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.view-btn:hover {
    border-color: #ddd;
    background: #fafafa;
}

.view-btn.active {
    background: #111;
    border-color: #111;
    color: white;
}

.explore-grid {
    position: relative;
    margin-top: 24px;
    min-height: 500px;
}

.explore-item {
    position: absolute;
    padding: 12px;
    width: calc(33.333% - 16px);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (min-width: 1200px) {
    .explore-item {
        width: calc(25% - 16px);
    }
}

.explore-item-inner {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.explore-item-inner:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.explore-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.5s ease;
}

.explore-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 20px;
    color: white;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.explore-item-inner:hover .explore-item-overlay {
    opacity: 1;
    transform: translateY(0);
}

.explore-item-details {
    margin-bottom: 16px;
}

.explore-item-prompt {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.explore-item-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    opacity: 0.8;
}

.explore-item-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.explore-item-actions {
    display: flex;
    gap: 8px;
}

.explore-item-actions .action-btn {
    padding: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.explore-item-actions .action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Responsive styles for explore page */
@media (max-width: 1024px) {
    .explore-item {
        width: calc(50% - 16px);
    }
}

@media (max-width: 768px) {
    .explore-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        overflow-x: auto;
        padding-bottom: 8px;
        margin-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .filter-btn {
        white-space: nowrap;
    }

    .explore-item {
        width: 100%;
        position: relative !important;
        transform: none !important;
        padding: 8px 0;
    }

    .explore-grid {
        height: auto !important;
    }

    .explore-item-overlay {
        opacity: 1;
        transform: none;
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    }
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.modal-content {
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 24px;
    color: white;
    cursor: pointer;
    z-index: 1;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-modal:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

#fullsize-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.modal-details {
    padding: 20px;
    border-top: 1px solid #eaeaea;
}

#modal-prompt {
    font-size: 14px;
    color: #333;
    margin-bottom: 16px;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 8px;
}

.modal-actions .action-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid #eaeaea;
    background: white;
    color: #333;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

.modal-actions .action-btn:hover {
    background: #fafafa;
    border-color: #ddd;
}

@media (max-width: 480px) {
    .page-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .upgrade-buttons-container {
        max-width: 100%;
    }
    
    .upgrade-btn {
        font-size: 11px;
        padding: 8px;
    }
    
    .purchase-btn .btn-text {
        font-size: 10px;
    }
    
    .main-content {
        padding: 16px;
        padding-top: 20px;
    }
}

@media (min-width: 1400px) {
    .main-content {
        max-width: 1400px;
    }
    
    .upgrade-buttons-container {
        right: calc((100% - 1400px) / 2 + 40px);
    }
}

/* Additional style to ensure images are interactive */
img {
    pointer-events: auto !important;
}