body { background: #0f172a; color: #f8fafc; font-family: system-ui, -apple-system, sans-serif; margin: 0; padding: 20px; }
.hidden { display: none !important; }
svg { max-width: 48px; max-height: 48px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #1e293b; }
::-webkit-scrollbar-thumb { background: #475569; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }
.preview-img { animation: fadeIn 0.3s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-scroll::-webkit-scrollbar { width: 4px; }
.modal-scroll::-webkit-scrollbar-thumb { background: #334155; border-radius: 2px; }

/* Прогресс-бар зелёный с плавной анимацией */
.progress-bar-fill {
    background: linear-gradient(90deg, #22c55e 0%, #4ade80 50%, #22c55e 100%);
    background-size: 200% 100%;
    animation: progressShine 1.5s ease-in-out infinite;
    transition: width 0.6s ease;
}
@keyframes progressShine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Миниатюры: плавное появление, без чёрного мерцания */
.thumb-img {
    transition: opacity 0.15s ease;
    background: transparent;
}
.thumb-img[src=""] { opacity: 0; }

/* Симулятор iPhone */
.iphone-sim { width: 300px; height: 600px; border: 12px solid #000; border-radius: 40px; background: #111; position: relative; overflow: hidden; box-shadow: inset 0 0 10px rgba(0,0,0,0.5), 0 20px 25px -5px rgba(0, 0, 0, 0.5); margin: 0 auto; }
.iphone-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 100px; height: 25px; background: #000; border-bottom-left-radius: 15px; border-bottom-right-radius: 15px; z-index: 50; }
.sim-content { width: 100%; height: 100%; overflow-y: auto; background: #fff; color: #000; padding-top: 35px; }
.sim-content::-webkit-scrollbar { display: none; }

/* Карусель в симуляторе */
.sim-content [id^="carousel-"]::-webkit-scrollbar { display: none; }
.sim-content .carousel-slide { min-width: 100%; }

/* Drag and Drop зоны */
.dropzone-post { border: 2px dashed transparent; transition: all 0.2s; }
.dropzone-post.dragover { border-color: #3b82f6; background-color: rgba(59, 130, 246, 0.1); }

/* --- ФИКС ИСКАЖЕНИЯ И ПРОПОРЦИЙ КАРТИНОК --- */
.media-item-drag { 
    cursor: grab; 
    position: relative; 
    aspect-ratio: 1 / 1 !important; 
    width: 100% !important; 
    height: auto !important;
    overflow: hidden; 
}
.media-item-drag img, .media-item-drag video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    position: absolute;
    top: 0;
    left: 0;
}
.media-item-drag:active { cursor: grabbing; }
.pool-checkbox { position: absolute; top: 4px; left: 4px; z-index: 10; width: 16px; height: 16px; cursor: pointer; box-shadow: 0 0 5px rgba(0,0,0,0.5); }

/* Instagram tab — section accents */
.border-l-2 { border-left-width: 2px !important; }
[id$="Content"] { transition: max-height 0.2s ease; }
