* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

*,
*::before,
*::after {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--tg-theme-bg-color, #f5f7fa) 0%, var(--tg-theme-secondary-bg-color, #e8ecf0) 100%);
    color: var(--tg-theme-text-color, #1a1a1a);
    padding: 20px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    image-rendering: auto;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transition: background 0.5s ease, color 0.5s ease;
    opacity: 0;
    animation: fadeInBody 0.5s ease forwards;
}

@keyframes fadeInBody {
    to {
        opacity: 1;
    }
}

img, svg, canvas {
    image-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

button, .btn, input, textarea, select {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    opacity: 0;
    animation: fadeInContainer 0.5s ease 0.2s forwards;
    transition: opacity 0.5s ease;
}

@keyframes fadeInContainer {
    to {
        opacity: 1;
    }
}

/* Единое время перехода для элементов при смене темы */
.upload-area,
.options-section,
.item-section,
.sidebar-content,
.section-content,
.upload-area h3,
.options-section h3,
.item-section h3,
h2,
h3 {
    transition: background 0.5s ease, color 0.5s ease, opacity 0.5s ease;
}

header {
    text-align: center;
    margin-bottom: 32px;
    padding: 0;
    background: transparent;
    border-radius: 24px;
    overflow: hidden;
    width: 100%;
}

.banner-container {
    position: relative;
    width: 100%;
    height: auto;
}

header h1 {
    font-size: 36px;
    font-weight: 900;
    margin: 0;
    color: var(--tg-theme-text-color, #1a1a1a);
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.header-banner {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    object-fit: contain;
    image-rendering: auto;
    will-change: transform;
    transform: translateZ(0);
    transition: opacity 0.5s ease;
}

#darkBanner {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
}

#lightBanner {
    opacity: 1;
}

/* Upload Section */
.upload-section {
    margin-bottom: 24px;
}

.upload-area {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    border-radius: 24px;
    padding: 48px 24px;
    text-align: center;
    cursor: default;
    transition: all 0.5s ease, background 0.5s ease, color 0.5s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}


.upload-content {
    pointer-events: auto;
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-content .btn {
    pointer-events: auto;
}

.upload-icon {
    font-size: 64px;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 12px rgba(37, 99, 235, 0.2));
}

.upload-area h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--tg-theme-text-color, #1a1a1a);
}

.upload-area p {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #6b7280);
    margin-bottom: 20px;
}

/* Progress Circle */
.upload-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

.progress-circle-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    flex-shrink: 0;
}

.progress-circle {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-circle-bg {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 8;
}

.progress-circle-fill {
    fill: none;
    stroke: url(#progressGradient);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s linear;
}

.progress-text {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #6b7280);
    text-align: center;
    max-width: 280px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    display: block;
}

/* Result */
.upload-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.result-image-container {
    width: 100%;
    max-width: 400px;
    margin-bottom: 24px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.result-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

#downloadButton {
    min-width: 200px;
}

/* Preview Section */
.preview-section {
    margin-top: 24px;
}

.preview-container {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.preview-container img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 400px;
    object-fit: contain;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf0 100%);
}

.btn-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-close:hover {
    background: rgba(239, 68, 68, 0.9);
    transform: scale(1.1);
}

.preview-actions {
    display: flex;
    gap: 12px;
}

/* Buttons */
.btn {
    padding: 16px 32px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.5s ease;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: #3ca4e2;
    color: white !important;
    box-shadow: none;
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.btn-primary:hover {
    background: #2e8bc4;
    filter: brightness(1.1);
}

.btn-primary:active {
    filter: brightness(0.95);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #1a1a1a !important;
    box-shadow: none;
    border: none;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 1);
    filter: brightness(0.95);
}

.btn-secondary:active {
    filter: brightness(1);
}

.btn-outline {
    background: #3ca4e2;
    color: white !important;
    box-shadow: none;
    border: none;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: #2e8bc4;
    filter: brightness(1.1);
}

.btn-outline:active {
    filter: brightness(0.95);
}

/* Options Section */
.options-section {
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: background 0.5s ease, color 0.5s ease;
}

.options-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--tg-theme-text-color, #1a1a1a);
}

.option-item {
    margin-bottom: 12px;
}

.option-button-wrapper {
    width: 100%;
    position: relative;
}

.option-button-wrapper .btn-outline {
    width: 100%;
    position: relative;
    overflow: visible;
    padding: 16px;
    isolation: isolate;
    box-sizing: border-box;
    text-align: center;
}

.option-button-wrapper .btn-outline::before {
    z-index: 0;
    pointer-events: none;
}

.option-button-wrapper .btn-outline .button-text {
    position: relative;
    z-index: 1;
    display: inline-block;
}

.option-button-wrapper .btn-outline .btn-edit-small,
.option-button-wrapper .btn-outline .btn-delete {
    position: absolute;
    z-index: 2;
}

.option-button-wrapper .btn-outline.filled {
    background: rgba(229, 231, 235, 0.95);
    color: #000000;
}

.option-button-wrapper .btn-outline.filled::before {
    display: none;
}

.option-button-wrapper .btn-outline:not(.filled) {
    color: #ffffff !important;
    background: #3ca4e2;
}

.option-button-wrapper .btn-outline .button-text {
    display: inline-block;
    text-align: center;
    color: inherit;
    margin: 0;
    padding: 0;
}

.option-button-wrapper .btn-outline.filled .button-text {
    color: #000000;
}

.option-button-wrapper .btn-outline:not(.filled) .button-text {
    color: #ffffff;
}

.btn-edit {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 16px;
    color: #1a1a1a !important;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.5s ease;
    white-space: nowrap;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: none;
    z-index: 10;
}

.btn-edit-small {
    display: none;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 8px;
    color: #000000 !important;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: none;
    z-index: 10;
    position: absolute;
    right: 44px;
    top: 50%;
    transform: translateY(-50%);
}

.option-button-wrapper .btn-outline .btn-edit-small {
    position: absolute;
}

.option-button-wrapper .btn-outline .btn-delete {
    position: absolute;
}

.btn-edit-small:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.02);
}

.btn-delete {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: rgba(239, 68, 68, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 8px;
    color: #ffffff !important;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    z-index: 10;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 1);
    transform: translateY(-50%) scale(1.02);
    box-shadow: none;
}

body.dark-theme .btn-edit-small {
    background: rgba(30, 30, 30, 0.95);
    color: #e5e5e5 !important;
}

body.dark-theme .btn-edit-small:hover {
    background: rgba(50, 50, 50, 1);
    transform: translateY(-50%) scale(1.02);
}

.emoji-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    margin: 0 4px;
    font-size: 18px;
    line-height: 1;
    text-align: center;
    vertical-align: middle;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    flex-shrink: 0;
    position: relative;
}

.emoji-tshirt {
    filter: sepia(1) saturate(5) hue-rotate(200deg);
}


.btn-edit:hover {
    color: #1a1a1a !important;
}

.btn-edit span:first-child {
    font-size: 16px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border-radius: 16px;
    background: #3ca4e2;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.checkbox-label:hover {
    background: #2e8bc4;
    filter: brightness(1.1);
}

.checkbox-label:active {
    filter: brightness(0.95);
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: white;
    border-radius: 12px;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    background-color: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    transition: all 0.5s ease;
    position: relative;
}

.checkbox-label input[type="checkbox"]:checked {
    accent-color: white;
    background-color: white;
    border-color: white;
    position: relative;
}

.checkbox-label input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #3ca4e2;
    font-size: 14px;
    font-weight: bold;
    display: block;
    line-height: 1;
    z-index: 2;
}

.checkbox-label input[type="checkbox"]:hover {
    border-color: rgba(255, 255, 255, 0.8);
}

.checkbox-label input[type="checkbox"]:checked:hover {
    border-color: white;
}

.checkbox-label span {
    font-size: 16px;
    font-weight: 500;
    color: white;
    text-align: center;
    flex: 1;
    position: relative;
    z-index: 1;
}

/* Item Sections */
.item-section {
    margin-bottom: 24px;
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: background 0.5s ease, color 0.5s ease;
}

.item-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--tg-theme-text-color, #1a1a1a);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--tg-theme-hint-color, #6b7280);
}

.button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.button-group .btn {
    flex: 1;
    min-width: 100px;
}

/* Специальные стили для кнопок макияжа */
#makeupSection .button-group .btn {
    background: #3ca4e2;
    color: white;
    border: none;
    padding: 20px 16px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(60, 164, 226, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 80px;
}

#makeupSection .button-group .btn:hover {
    background: #2a8bc7;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(60, 164, 226, 0.4);
}

#makeupSection .button-group .btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(60, 164, 226, 0.3);
}

body.dark-theme #makeupSection .button-group .btn {
    background: #276ba3;
    box-shadow: 0 4px 12px rgba(39, 107, 163, 0.4);
}

body.dark-theme #makeupSection .button-group .btn:hover {
    background: #1e5280;
    box-shadow: 0 6px 16px rgba(39, 107, 163, 0.5);
}

.button-group .btn-outline {
    color: white !important;
}

.button-group button.btn-outline {
    color: white !important;
}

.button-group .btn.btn-outline {
    color: white !important;
}

.input-text {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: var(--tg-theme-text-color, #1a1a1a);
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.5s ease;
}

.input-text:focus {
    outline: none;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 1);
}

/* Loading Overlay */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.3s ease;
}

.auth-content {
    text-align: center;
    padding: 40px;
}

.auth-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 24px;
    background: #3ca4e2;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
    position: relative;
    overflow: hidden;
}

.auth-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.auth-button:hover::before {
    left: 100%;
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.4);
}

.auth-button:active {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.auth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.auth-icon svg {
    width: 100%;
    height: 100%;
    fill: white;
    color: white;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 24px;
    text-align: center;
    max-width: 300px;
    margin: 0 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.spinner {
    width: 56px;
    height: 56px;
    border: 5px solid rgba(60, 164, 226, 0.2);
    border-top-color: #3ca4e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

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

.loading-content p {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--tg-theme-text-color, #1a1a1a);
}

.loading-subtitle {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #6b7280);
}

/* Responsive */
/* Скрываем кнопки навигации слайдера на мобильных устройствах */
@media (max-width: 768px) {
    .slider-btn {
        display: none !important;
    }
}

@media (max-width: 480px) {
    body {
        padding: 16px;
    }
    
    .sidebar-overlay {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    header {
        padding: 0;
        border-radius: 16px;
        margin-bottom: 24px;
    }
    
    .header-banner {
        border-radius: 16px;
        width: 100%;
        height: auto;
    }
    
    header h1 {
        font-size: 26px;
    }
    
    .upload-area {
        padding: 40px 20px;
        border-radius: 20px;
    }
    
    .btn {
        padding: 14px 28px;
        border-radius: 14px;
    }
}

@media (max-width: 360px) {
    header {
        margin-bottom: 20px;
    }
    
    .header-banner {
        border-radius: 12px;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 24px 0;
    margin-top: 32px;
}

footer p {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #6b7280);
    margin: 0;
    font-weight: 400;
}

/* Smooth transitions */
* {
    -webkit-tap-highlight-color: transparent;
}

button, .checkbox-label, .upload-area {
    -webkit-tap-highlight-color: transparent;
}

/* Top Controls */
.top-controls {
    position: fixed;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    z-index: 1000;
}

/* Menu Toggle Button */
.menu-toggle {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 12px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: #1a1a1a;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.menu-toggle:active {
    transform: scale(0.98);
}

/* Theme Toggle Container */

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar.active .sidebar-overlay {
    opacity: 1;
}

.sidebar-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 85%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    border-top-left-radius: 24px;
    border-bottom-left-radius: 24px;
}

.sidebar.active .sidebar-content {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.sidebar-close {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 24px;
    color: #1a1a1a;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
}

.sidebar-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

.sidebar-nav {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 16px;
    border-radius: 12px;
    text-decoration: none;
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.3s ease, transform 0.3s ease, color 0.3s ease;
    background: transparent;
}

.sidebar-link:hover:not(.active) {
    background: #e5e7eb;
    transform: translateX(-4px);
}

.sidebar-link.active {
    background: #d1d5db !important;
    color: #1a1a1a !important;
}

.sidebar-link.active:hover {
    background: #d1d5db !important;
    transform: none;
}

/* Content Sections */
.content-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.section-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px;
    max-width: 90%;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin: 0 auto;
}

.section-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #4a4a4a;
    font-size: 24px;
    font-weight: 400;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10;
    padding: 0;
    line-height: 1;
}

.section-close-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a1a;
}

.section-close-btn:active {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(0.95);
}


.section-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    padding-right: 40px;
}

.section-content p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Instruction List */
.instruction-list {
    margin-bottom: 24px;
}

.instruction-item {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.instruction-container {
    background: #f3f4f6;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.instruction-container:last-child {
    margin-bottom: 0;
}

.instruction-container p {
    margin: 0;
    line-height: 1.6;
    color: var(--tg-theme-text-color, #1a1a1a);
}

body.dark-theme .instruction-container {
    background: #374151;
}

body.dark-theme .instruction-container p {
    color: #ffffff;
}

.instruction-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: #3ca4e2;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.instruction-item p {
    flex: 1;
    margin: 0;
    padding-top: 4px;
}

/* Conditions List */
.conditions-list {
    margin-bottom: 24px;
}

.conditions-list p {
    margin-bottom: 16px;
    padding-left: 20px;
    position: relative;
}

.conditions-list p::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #3ca4e2;
    font-size: 20px;
    line-height: 1;
}

/* Slider */
.examples-content {
    max-width: 600px;
    max-height: calc(100vh - 80px) !important;
    overflow: visible !important;
    overflow-y: auto !important;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.examples-content h2 {
    margin-bottom: 16px;
    flex-shrink: 0;
    font-size: 20px;
}

.examples-content .btn-primary {
    flex-shrink: 0;
    margin-top: auto;
}

.examples-content .slider-container {
    position: relative;
    width: 100%;
    margin-bottom: 12px;
    flex-shrink: 1;
    min-height: 0;
}

.examples-content .slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 1 / 1;
    background: #f3f4f6;
    flex-shrink: 1;
    min-height: 0;
    max-height: 400px;
}

.slider-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.slider-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-sizing: border-box;
    background: #f3f4f6;
    border-radius: 12px;
}

.slider-slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    color: #1a1a1a;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.slider-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.slider-btn-prev {
    left: 12px;
}

.slider-btn-next {
    right: 12px;
}

.examples-content .slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.slider-dot.active {
    background: #3ca4e2;
    width: 24px;
    border-radius: 4px;
}

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Dark Theme */
body.dark-theme {
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    color: #e5e5e5;
    transition: background 0.5s ease, color 0.5s ease;
}

body.dark-theme .upload-area,
body.dark-theme .options-section,
body.dark-theme .item-section,
body.dark-theme .sidebar-content,
body.dark-theme .section-content {
    background: rgba(30, 30, 30, 0.95);
    color: #e5e5e5;
    transition: background 0.5s ease, color 0.5s ease;
}

body.dark-theme .section-close-btn {
    color: #b0b0b0;
}

body.dark-theme .section-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e5e5e5;
}

body.dark-theme .section-close-btn:active {
    background: rgba(255, 255, 255, 0.15);
}

body.dark-theme .section-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e5e5e5;
}

body.dark-theme .section-close-btn:active {
    background: rgba(255, 255, 255, 0.15);
}

body.dark-theme .btn-outline,
body.dark-theme .checkbox-label {
    background: #276ba3;
}

body.dark-theme .btn-outline:hover,
body.dark-theme .checkbox-label:hover {
    background: #1e5a8c;
}

body.dark-theme .option-button-wrapper .btn-outline.filled {
    background: rgba(55, 65, 81, 0.95);
    color: #ffffff;
}

body.dark-theme .option-button-wrapper .btn-outline.filled .button-text {
    color: #ffffff !important;
}

body.dark-theme .option-button-wrapper .btn-outline:not(.filled) {
    background: #276ba3;
    color: #ffffff !important;
}

body.dark-theme .option-button-wrapper .btn-outline:not(.filled):hover {
    background: #1e5a8c;
}

body.dark-theme .option-button-wrapper .btn-outline.filled::before {
    display: none;
}

body.dark-theme .option-button-wrapper .btn-outline:not(.filled) .button-text {
    color: #ffffff;
}

body.dark-theme .menu-toggle {
    background: rgba(30, 30, 30, 0.95);
}

body.dark-theme .menu-toggle span {
    background: #e5e5e5;
}

body.dark-theme .sidebar-link,
body.dark-theme .sidebar-header h2,
body.dark-theme .sidebar-close {
    color: #e5e5e5;
    transition: color 0.5s ease, background 0.3s ease, transform 0.3s ease;
}

body.dark-theme .sidebar-link:hover:not(.active) {
    background: rgba(107, 114, 128, 0.3);
    transform: translateX(-4px);
}

body.dark-theme .sidebar-link.active {
    background: #9ca3af !important;
    color: #1a1a1a !important;
}

body.dark-theme .sidebar-link.active:hover {
    background: #9ca3af !important;
    transform: none;
}

body.dark-theme footer p {
    color: #9ca3af;
}

body.dark-theme .btn-primary {
    background: #276ba3;
}

body.dark-theme .btn-primary:hover {
    background: #1e5a8c;
}

body.dark-theme .input-text {
    background: rgba(40, 40, 40, 0.95);
    color: #e5e5e5;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .header-banner {
    opacity: 0.9;
}

body.dark-theme .emoji-icon {
    background: rgba(40, 40, 40, 0.95);
}

body.dark-theme h2,
body.dark-theme h3,
body.dark-theme .upload-area h3,
body.dark-theme .options-section h3,
body.dark-theme .item-section h3 {
    color: #e5e5e5;
    transition: color 0.5s ease;
}


body.dark-theme .instruction-item p,
body.dark-theme .conditions-list p {
    color: #e5e5e5;
}

body.dark-theme .slider-wrapper {
    background: #1f2937;
}

body.dark-theme .slider-btn {
    background: rgba(30, 30, 30, 0.95);
    color: #e5e5e5;
}

body.dark-theme .slider-btn:hover {
    background: rgba(40, 40, 40, 0.95);
}

body.dark-theme .slider-dot {
    background: #4b5563;
}

body.dark-theme .slider-dot.active {
    background: #276ba3;
}

/* Orders History */
.orders-warning {
    background: #b45309;
    border: 2px solid #92400e;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #fef3c7;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.warning-icon {
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1.2;
}

.warning-text {
    flex: 1;
    line-height: 1.4;
}

.orders-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    min-height: 200px;
    overflow: visible;
    transition: opacity 0.3s ease;
}

.orders-grid-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 12px 16px;
    gap: 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.orders-grid-item:hover {
    background: #e5e7eb;
}

.orders-item-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 12px;
}

.orders-item-title {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a !important;
    white-space: nowrap;
    flex-shrink: 0;
}

.orders-item-date {
    font-size: 14px;
    color: #6b7280 !important;
    white-space: nowrap;
    margin-left: auto;
    flex-shrink: 0;
}

.orders-item-image-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.orders-grid-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-download-small {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #3ca4e2;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-download-small svg {
    width: 20px;
    height: 20px;
    transition: all 0.2s ease;
}

.btn-download-small:hover {
    color: #2e8bc4;
}

.btn-download-small:hover svg {
    transform: translateY(2px);
}

.btn-download-small:active {
    transform: scale(0.95);
}

body.dark-theme .orders-grid-item img {
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.orders-grid-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 20px;
    color: #6b7280;
    font-size: 16px;
}

.orders-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
}

.orders-pagination .pagination-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 16px;
    min-width: 70px;
}

.orders-pagination .pagination-text {
    font-size: 12px;
    line-height: 1.2;
    font-weight: 500;
}

.orders-pagination .pagination-arrow {
    font-size: 18px;
    line-height: 1;
    font-weight: bold;
}

.pagination-info {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    text-align: center;
    flex: 0 0 auto;
}

.orders-content {
    max-width: 600px;
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
}

/* Support */
.referral-content {
    padding: 20px 0;
}

.referral-content > p {
    margin-bottom: 24px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--tg-theme-text-color, #1a1a1a);
}

.referral-link-container {
    margin-bottom: 32px;
}

.referral-link-container label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 14px;
    color: var(--tg-theme-text-color, #1a1a1a);
}

.referral-input-group {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.referral-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--tg-theme-hint-color, #e5e7eb);
    border-radius: 12px;
    font-size: 14px;
    background: var(--tg-theme-bg-color, #ffffff);
    color: var(--tg-theme-text-color, #1a1a1a);
    font-family: 'Courier New', monospace;
    transition: border-color 0.3s ease;
}

.referral-input:focus {
    outline: none;
    border-color: var(--tg-theme-button-color, #3ca4e2);
}

.referral-stats {
    margin-top: 32px;
    padding: 20px;
    background: var(--tg-theme-secondary-bg-color, #f9fafb);
    border-radius: 12px;
}

.referral-stats h3 {
    margin-bottom: 16px;
    font-size: 18px;
    color: var(--tg-theme-text-color, #1a1a1a);
}

.referral-stats p {
    margin-bottom: 8px;
    font-size: 15px;
    color: var(--tg-theme-text-color, #1a1a1a);
}

.referral-stats strong {
    color: var(--tg-theme-button-color, #3ca4e2);
    font-weight: 600;
}

body.dark-theme .referral-input {
    background: var(--tg-theme-bg-color, #1a1a1a);
    border-color: var(--tg-theme-hint-color, #374151);
    color: var(--tg-theme-text-color, #ffffff);
}

body.dark-theme .referral-stats {
    background: var(--tg-theme-secondary-bg-color, #2a2a2a);
}

body.dark-theme .referral-stats h3,
body.dark-theme .referral-stats p {
    color: var(--tg-theme-text-color, #ffffff);
}

body.dark-theme .referral-stats strong {
    color: var(--tg-theme-button-color, #276ba3);
}

.support-content {
    margin-bottom: 24px;
}

.support-content > p {
    color: var(--tg-theme-text-color, #1a1a1a);
}

.support-info {
    background: #f3f4f6;
    padding: 20px;
    border-radius: 12px;
    margin-top: 16px;
}

.support-info p {
    margin-bottom: 12px;
}

.support-info p:last-child {
    margin-bottom: 0;
}

.support-info strong {
    color: #3ca4e2;
}

/* Order Image Modal */
.order-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.order-image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.order-image-modal-content img {
    max-width: 100%;
    max-height: calc(90vh - 80px);
    object-fit: contain;
    border-radius: 12px;
}

.order-image-modal-content .btn-download {
    margin-top: 16px;
    width: auto;
    min-width: 200px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(60, 164, 226, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.order-image-modal-content .btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(60, 164, 226, 0.4);
}

.order-image-modal-content .btn-download:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(60, 164, 226, 0.3);
}

.order-image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.order-image-modal-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

body.dark-theme .orders-warning {
    background: #b45309;
    border: 2px solid #92400e;
    color: #fef3c7;
}

body.dark-theme .orders-grid-item {
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .orders-grid-item:hover {
    background: #4a4a4a;
}


body.dark-theme .orders-grid-empty {
    color: #d1d5db;
}

body.dark-theme .pagination-info {
    color: #d1d5db;
}

body.dark-theme .orders-item-title {
    color: #ffffff !important;
    font-weight: 600;
}

body.dark-theme .orders-item-date {
    color: #9ca3af;
    font-weight: 400;
}

body.dark-theme .orders-content h2 {
    color: #ffffff;
    font-weight: 700;
}

body.dark-theme .section-content h2 {
    color: #ffffff;
    font-weight: 700;
}

body.dark-theme .orders-content {
    background: rgba(30, 30, 30, 0.95);
}

body.dark-theme .section-content {
    background: rgba(30, 30, 30, 0.95);
    color: #e5e5e5;
}

body.dark-theme .orders-pagination .btn-secondary {
    background: rgba(30, 30, 30, 0.95);
    color: #e5e5e5 !important;
}

body.dark-theme .orders-pagination .btn-secondary:hover {
    background: #4a4a4a;
    filter: brightness(1);
}

body.dark-theme .orders-pagination .btn-secondary:active {
    background: #5a5a5a;
    filter: brightness(0.95);
}

body.dark-theme .support-info {
    background: #374151;
}

body.dark-theme .slider-slide {
    background: #374151;
}

body.dark-theme .btn-download-small {
    background: transparent;
    color: #ffffff;
}

body.dark-theme .btn-download-small:hover {
    background: transparent;
    color: #e5e5e5;
}

body.dark-theme .support-content > p {
    color: #ffffff;
}

body.dark-theme .support-info p {
    color: #e5e5e5;
}

body.dark-theme .order-image-modal-close {
    background: rgba(30, 30, 30, 0.9);
    color: #e5e5e5;
}

body.dark-theme .order-image-modal-close:hover {
    background: rgba(40, 40, 40, 0.9);
}

body.dark-theme .order-image-modal-content .btn-download {
    box-shadow: 0 4px 12px rgba(39, 107, 163, 0.3);
}

body.dark-theme .order-image-modal-content .btn-download:hover {
    box-shadow: 0 6px 16px rgba(39, 107, 163, 0.4);
}

body.dark-theme .order-image-modal-content .btn-download:active {
    box-shadow: 0 2px 8px rgba(39, 107, 163, 0.3);
}

body.dark-theme .progress-circle-bg {
    stroke: #374151;
}

body.dark-theme .progress-text {
    color: #9ca3af;
}

body.dark-theme .result-image-container {
    background: #1f2937;
}

/* Makeup section styles */
.makeup-instruction {
    margin-bottom: 24px;
}

.makeup-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    object-fit: contain;
    display: block;
}

.makeup-image:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.makeup-image:active {
    transform: scale(0.98);
}

.makeup-text {
    padding: 16px;
    background: #f3f4f6;
    border-radius: 12px;
    margin-top: 16px;
}

.makeup-text p {
    margin: 8px 0;
    line-height: 1.6;
    color: var(--tg-theme-text-color, #1a1a1a);
}

.makeup-text p:first-child {
    margin-top: 0;
    font-weight: 600;
}

.makeup-text p:last-child {
    margin-bottom: 0;
}

body.dark-theme .makeup-text {
    background: #374151;
}

body.dark-theme .makeup-text p {
    color: #ffffff;
}

/* Модальное окно для увеличения фото макияжа */
.image-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeInModal 0.3s ease;
}

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

.image-modal-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.image-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.image-modal-close:active {
    transform: scale(0.95);
}

body.dark-theme .image-modal-close {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-theme .image-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}
