:root {
    --primary: #F48FB1;              /* розово-пудровый акцент */
    --primary-hover: #EC407A;        /* насыщенный розовый */
    --background: #1E1418;           /* глубокий тёплый фон */
    --card-bg: rgba(255, 255, 255, 0.03); /* мягкие светлые карточки */
    --card-border: rgba(255, 255, 255, 0.08);
    --text-light: #FFF0F5;           /* тёплый светлый текст */
    --text-muted: #D9A7B0;           /* нюдовый для описаний */
    --error: #FF5F5F;
    --success: #76D7C4;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}



    * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }

    html {
        background-color: var(--background);
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
        scroll-behavior: smooth;
    }

body {
    background: linear-gradient(180deg, #2E1B20 0%, #1E1418 100%);
    color: var(--text-light);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

    /* Main Content */
    main {
        max-width: 1200px;
        margin: 0 auto;
        padding: 40px 20px;
    }

.page-title {
    text-align: center;
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 40px;
    background: linear-gradient(90deg, #F48FB1, #FFCDD2);
    -webkit-background-clip: text;
    color: transparent;
}

.page-subtitle {
    text-align: center;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 40px;
    font-size: 18px;
}

    /* Upload Card */
    .try-it {
        width: 100%;
        max-width: 1100px;
        margin: 0 auto;
    }

.model-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    overflow: hidden;
    transition: var(--transition);
}

.model-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

    .model-card-container {
        display: flex;
        flex-direction: row;
        width: 100%;
        padding: 24px;
        gap: 24px;
    }

    .model-card-col {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .image-input {
        width: 100%;
        max-width: 400px;
    }

    .model-input-col {
        display: flex;
        flex-direction: column;
        width: 100%;
        border-radius: var(--radius-md);
    }

    .show-for-file-upload-mode {
        width: 100%;
        margin-bottom: 20px;
    }

    .model-input-file-picker {
        display: none;
    }

    /* Upload Area */
.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border-radius: var(--radius-md);
    border: 2px dashed var(--card-border);
    background: rgba(255, 255, 255, 0.02);
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.04);
}

    .upload-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
        fill: var(--primary);
    }

    .drag-and-drop {
        color: var(--text-light);
        font-size: 18px;
        font-weight: 500;
        margin-bottom: 8px;
    }

    .subtext-caption {
        color: var(--text-muted);
        font-size: 14px;
        margin-bottom: 16px;
    }

    .hyperlink {
        color: var(--text-muted);
        text-decoration: none;
        transition: var(--transition);
    }

    .hyperlink:hover {
        color: var(--primary);
        text-decoration: underline;
    }

    .copy-paste {
        color: var(--text-muted);
        font-size: 14px;
        margin-top: 16px;
    }

    #paste-area {
        background: rgba(74, 66, 97, 0.7);
        border: none;
        color: white;
        padding: 6px 12px;
        border-radius: var(--radius-sm);
        cursor: pointer;
        transition: var(--transition);
        font-size: 14px;
    }

    #paste-area:hover {
        background: var(--primary);
    }

    /* Buttons */
    .button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 12px 24px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 100px;
        cursor: pointer;
        transition: var(--transition);
        border: none;
        white-space: nowrap;
    }

    #modelSubmitButton {
        width: 100%;
        background: var(--primary);
        color: white;
        padding: 16px;
        font-size: 18px;
        margin-top: 16px;
		cursor:pointer;
    }

    #modelSubmitButton:hover {
        background: var(--primary-hover);
        transform: translateY(-2px);
    }

    #modelSubmitButton:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
    }

    /* Results Section */
    .image-output {
        display: flex;
        flex-direction: column;
        gap: 16px;
        width: 100%;
    }

    #progressContainer {
        width: 100%;
        height: 8px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
        overflow: hidden;
    }

    #deepaiProgressBar {
        height: 100%;
        background: linear-gradient(90deg, var(--primary), #D53F8C);
        width: 0%;
        transition: width 0.5s ease;
    }

    .try-it-result-area {
        width: 100%;
        height: 500px;
        border-radius: var(--radius-md);
        background: rgba(17, 13, 35, 0.7);
        position: relative;
        overflow: hidden;
    }

.placeholder-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
}
.placeholder-image.loading {
    animation: pulseAnimation 2s infinite ease-in-out;
    filter: brightness(0.7);
}
@keyframes pulseAnimation {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.02); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 5, 29, 0.7);
    z-index: 10;
    border-radius: var(--radius-md);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(143, 55, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

     /* Download Button */
#download-button {
    display: none;
    background: #10b981; /* Более насыщенный основной цвет */
    border: none;
    border-radius: 5px;
    padding: 10px 15px; /* Увеличил отступы */
    color: white;
    font-weight: 700; /* Более жирный шрифт */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    align-items: center;
    gap: 10px; /* Увеличил расстояние между иконкой и текстом */
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4); /* Добавил тень */
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2); /* Тонкая светлая обводка */
    text-transform: uppercase; /* Все буквы заглавные */
    letter-spacing: 0.5px; /* Разрядка букв */
}

#download-button[imagewasGenerated="True"] {
    display: inline-flex;
    animation: fadeIn 0.4s ease-out; /* Анимация появления */
}

#download-button:hover {
    background: var(--primary-hover);
    transform: translateY(-3px); /* Более выраженный подъем */
}

#download-button:active {
    transform: translateY(1px); /* Эффект нажатия */
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

/* Эффект "свечения" при наведении */
#download-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 5px;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.6);
    opacity: 0;
    transition: opacity 0.3s;
}

#download-button:hover::after {
    opacity: 1;
}

    .download-icon {
        width: 20px;
        height: 20px;
    }

    /* Error Popup */
    #errorpopup {
        position: fixed;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(33, 17, 39, 0.95);
        border: 1px solid var(--error);
        border-radius: 100px;
        padding: 12px 24px;
        display: none;
        align-items: center;
        gap: 12px;
        z-index: 100;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(10px);
    }

    #errorpopup.show {
        display: flex;
        animation: fadeInUp 0.5s, fadeOutDown 0.5s 2.5s forwards;
    }

    .errorIcon {
        width: 20px;
        height: 20px;
        fill: var(--error);
    }

    @keyframes fadeInUp {
        from { opacity: 0; transform: translateX(-50%) translateY(20px); }
        to { opacity: 1; transform: translateX(-50%) translateY(0); }
    }

    @keyframes fadeOutDown {
        from { opacity: 1; transform: translateX(-50%) translateY(0); }
        to { opacity: 0; transform: translateX(-50%) translateY(20px); }
    }

    /* Footer */
    footer {
        padding: 40px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        margin-top: 60px;
    }

    .footer-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }

    .footer-links {
        display: flex;
        gap: 10px;
    }

    .footer-link {
        color: var(--text-muted);
        text-decoration: none;
        transition: var(--transition);
    }

    .footer-link:hover {
        color: var(--text-light);
    }

    .copyright {
        color: var(--text-muted);
        font-size: 14px;
    }

    /* Examples Section */
    .examples-section {
        margin: 80px 0;
        text-align: center;
    }

.section-title {
    font-size: 32px;
    background: linear-gradient(90deg, #F48FB1, #FFCDD2);
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 30px;
}

    .examples-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
        margin-top: 30px;
    }

    .example-card {
        border-radius: var(--radius-md);
        overflow: hidden;
        background: var(--card-bg);
        border: 1px solid var(--card-border);
        transition: var(--transition);
    }

    .example-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    }

    .example-image {
        width: 100%;
        height: 300px;
        object-fit: cover;
    }

    .example-caption {
        padding: 15px;
        text-align: center;
    }

    .example-title {
        font-weight: 600;
        margin-bottom: 5px;
    }

    .example-description {
        color: var(--text-muted);
        font-size: 14px;
    }

    /* SEO Text Section */
.seo-section {
    margin: 60px 0;
    padding: 30px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-lg);
}

    .seo-title {
        font-size: 24px;
        margin-bottom: 20px;
        color: var(--text-light);
    }

    .seo-text {
        color: var(--text-muted);
        line-height: 1.8;
        margin-bottom: 20px;
    }

    .seo-list {
        color: var(--text-muted);
        margin-left: 20px;
        margin-bottom: 20px;
    }

    .seo-list li {
        margin-bottom: 10px;
    }

    /* Responsive Design */
    @media (max-width: 1024px) {
        .model-card-container {
            flex-direction: column;
        }
        
        .image-input {
            max-width: 100%;
        }
        
        .try-it-result-area {
            height: 400px;
        }

        .examples-grid {
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        }
    }

    @media (max-width: 768px) {
        .page-title {
            font-size: 32px;
        }
        
        .page-subtitle {
            font-size: 16px;
        }
        
        .model-card-container {
            padding: 16px;
        }
        
        .upload-area {
            padding: 30px 20px;
        }

        .section-title {
            font-size: 28px;
        }
    }

    @media (max-width: 480px) {
        .page-title {
            font-size: 28px;
        }
		
		.footer-links {
    flex-direction: column;
}
        
        .try-it-result-area {
            height: 300px;
        }
        
        #modelSubmitButton {
            padding: 14px;
            font-size: 16px;
        }
        
        .upload-icon {
            width: 48px;
            height: 48px;
        }
        
        .drag-and-drop {
            font-size: 16px;
        }

        .examples-grid {
            grid-template-columns: 1fr;
        }

        .example-image {
            height: 250px;
        }

        .seo-section {
            padding: 20px;
        }
    }
	
	/* Основная кнопка "Поделиться" */
#share-button {
    background-color: #4285f4;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-left: 10px;
    transition: background 0.3s;
}

#share-button:hover {
    background-color: #3367d6;
}

.share-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
}

/* Кнопки соцсетей */
#social-share-buttons {
    display: none;
    flex-wrap: wrap;
    justify-content: center;
}

.social-button {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.2s;
}

.social-button:hover {
    transform: scale(1.05);
}

.social-button img {
    margin-right: 8px;
}

/* Цвета для кнопок */
.vk { background-color: #0077FF; color: white; }
.tg { background-color: #0088cc; color: white; }
.wa { background-color: #25D366; color: white; }

.comparison-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.comparison-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.comparison-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
	 --slider-pos: 50%;
}

.image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.image.before {
    z-index: 1;
}

.image.after {
    z-index: 2;
    clip-path: inset(0 0 0 50%);
    filter: saturate(1.1);
}

.slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    z-index: 3;
    cursor: ew-resize;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.slider-handle:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 25px rgba(0,0,0,0.25);
}

.slider-icon {
    width: 24px;
    height: 24px;
    fill: #555;
}

.caption-container {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    position: absolute;
    bottom: 0;
    width: 100%;
    z-index: 4;
}

.caption {
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.before-caption {
    background: rgba(100, 100, 100, 0.6);
    border: 1px solid rgba(255,255,255,0.2);
}

.after-caption {
    background: rgba(40, 120, 200, 0.6);
    border: 1px solid rgba(255,255,255,0.2);
}

.caption:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Анимация разделительной линии */
.image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--slider-pos);
    width: 2px;
    background: white;
    z-index: 3;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    transform: translateX(-50%);
    transition: left 0.2s ease-out;
}
.rcy{margin:2px auto 0;width:100%;height:auto; max-height:500px;}