body * {
    font-family: "TikTok Sans", sans-serif;
}

body {
    background-color: #181610;
    color: #fff;
    font-family: 'Segoe UI', sans-serif;
}

.navbar.bg-dark {
    background: #181610 !important;
}

.navbar.bg-dark * {
    color: white;
}

.header__balance {
    background: #313131 !important;
    color: #f4d03f !important;
}

.header__balance * {
    background: #313131 !important;
    color: #f4d03f !important;
}

main {
    padding-top: 16px;
}

.card-dark {
    background-color: #17181c;
    border: 1px solid #333;
    border-radius: 12px;
}

/* Переключатели модов */
.mode-switcher, .model-group {
    background: #1C1F2A;
    padding: 4px;
    border-radius: 8px;
}

.btn-mode, .btn-sub-mode {
    flex: 1;
    border: none;
    padding: 8px;
    border-radius: 6px;
    background: transparent;
    color: #fff;
    font-size: 14px;
    transition: 0.3s;
}

.btn-mode.active {
    background: linear-gradient(270deg, #fa913b 0%, #cb8a05 100%);
    color: #fff;
    font-weight: 600;
}

.btn-sub-mode.active {
    background: linear-gradient(270deg, #fa913b 0%, #cb8a05 100%);
    color: #fff;
    font-weight: 600;
}

/* Зона загрузки */
.upload-box {
    border: 2px dashed #444;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    background: unset;
}

.plus-icon {
    font-size: 24px;
    color: #666;
}

/* Поля ввода */
.form-control, .form-select, .input {
    border-color: #333333;
    color: #eee !important;
}

.form-control:focus, .input:focus {
    background-color: #222;
    border-color: #f39c12;
    box-shadow: none;
}

.input {
    background: transparent;
}

/* Кнопка создания */
.btn-create {
    background: linear-gradient(90deg, #d35400, #e67e22);
    color: white;
    font-weight: bold;
    border: none;
    padding: 12px;
    transition: 0.5s ease;
}

select.form-select {
    background: #17181c !important;

    border: 1px solid #333333;
}

select.form-select option {
    background: #17181c !important;

    border: 1px solid #333333;
}

.btn-create:hover {
    color: white;
    transition: 0.5s ease;
    opacity: 0.8;
}

.res-group .btn {
    background: #1C1F2A;
    color: #fff;
}

.res-group .btn.active {
    background: #f39c12;
    color: #fff;
    border: unset;
    outline: none;
    font-weight: 600;
}

textarea.form-control, .input {
    border: 1px solid #333333;
}

.select2-container--krajee-bs5.select2-container--open.select2-container--below .select2-selection {
    background: #222222 !important;
}

.select2-container--krajee-bs5:not(.select2-container--disabled) .select2-dropdown {
    background: #222222 !important;
}

.select2-container--krajee-bs5 .select2-selection--multiple {
    background: #222222 !important;
    border: 1px solid #333333 !important;
    color: white !important;
}

.select2-container--krajee-bs5 .select2-selection--multiple .select2-search--inline .select2-search__field {
    color: white !important;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.preview-item {
    position: relative;
    aspect-ratio: 1/1;
}
.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #444;
}
.remove-img {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4d4d;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
    cursor: pointer;
    border: 1px solid #fff;
}

.header__logo {
    max-width: 30px;
}


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

.spinner {
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

.image-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 15px;
    padding: 20px;
    width: 300px;
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.image-card__loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 1.1em;
    gap: 16px;
}

.alert-fixed {
    position: fixed;
    right: 35px;
    top: 35px;
    z-index: 100;
    max-width: 300px;
}

.modal.show .modal-dialog {
    max-width: 100%;
}

.modal-content {
    max-width: 100%!important;
}

.modal-body {
    max-width: 100%!important;
}

@media screen and (max-width: 660px) {
    .image-card {
        max-width: 100%;
        margin: 16px 0;
    }
}

@media screen and (max-width: 576px) {
    #modalPrompt {
        max-width: 100%!important;
    }
}