@font-face {
    font-family: PTRootUIRegular;
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

body {
    margin: 0;
    font-family: PTRootUIRegular, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15px;
    line-height: 140%;
    color: #272727;
    background-color: #fff;
    overflow-x: hidden;
}

.hint-panel {
    position: absolute;
    top: 22px;
    left: 22px;
    background: rgba(255,255,255,0.95);
    padding: 18px 22px;
    border-radius: 12px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.06);
    backdrop-filter: blur(8px);
    border-left: 4px solid #17172F;
    max-width: 300px;
    z-index: 100;
}

.hint-title {
    font-size: 14px;
    font-weight: 600;
    color: #17172F;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.hint-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.hint-row img {
    width: 18px;
    height: 18px;
    margin-right: 10px;
}

.control-panel {
    position: fixed;
    bottom: 22px;
    left: 22px;
    background: rgba(255,255,255,0.95);
    padding: 18px 22px;
    border-radius: 12px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.06);
    backdrop-filter: blur(8px);
    border-left: 4px solid #17172F;
    max-width: 300px;
    z-index: 100;
}

.notifications-panel {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 16px 24px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid #e1e1e1;
    z-index: 1000;
    transition: all 0.3s ease;
    min-width: 300px;
    max-width: 500px;
}

.notifications-panel.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    pointer-events: none;
}

.notifications-panel.error {
    border-left: 6px solid #F81E24;
}

.notifications-panel.success {
    border-left: 6px solid #00C48C;
}

.notifications-panel.warning {
    border-left: 6px solid #FFB800;
}

.notifications-panel.info {
    border-left: 6px solid #17172F;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-icon {
    font-size: 24px;
    line-height: 1;
}

.notification-message {
    flex: 1;
    font-size: 15px;
    color: #272727;
    text-align: left;
}

.right-panel {
    position: fixed;
    top: 22px;
    right: 22px;
    bottom: 22px;
    width: 340px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.06);
    backdrop-filter: blur(10px);
    border-left: 4px solid #17172F;
    display: flex;
    flex-direction: column;
    font-family: PTRootUIRegular, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.4;
    color: #272727;
    overflow: hidden;
    z-index: 100;
}

.panel-title {
    font-size: 16px;
    font-weight: 600;
    color: #17172F;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.panel-search {
    width: 100%;
    margin-bottom: 16px;
}

.panel-search input {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 8px;
    border: 1px solid #ccc;
    outline: none;
    transition: 0.2s all;
    box-sizing: border-box;
}

.panel-search input:focus {
    border-color: #134ea1;
    box-shadow: 0 0 8px rgba(19, 78, 161, 0.3);
}

.panel-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    margin-bottom: 20px;
}

.item-card {
    background-color: #26266e;
    border-radius: 12px;
    border: 1px solid #e1e1e1;
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 14px;
    color: #ffffff;
    cursor: grab;
    transition: 0.2s all;
    padding: 5px;
}

.item-card img {
    width: 200%;
    max-width: none;
    height: auto;
    object-fit: contain;
    margin-bottom: 5px;
}

.item-card:hover {
    background-color: #F81E24;
}

.panel-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.btn-buy {
    background-color: #26266e;
    color: #fff;
    border: none;
    padding: 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s all;
}

.btn-buy:hover {
    background-color: #F81E24;
}

.btn-back {
    background-color: #F81E24;
    color: #fff;
    border: none;
    padding: 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s all;
}

.btn-back:hover {
    background-color: #FE3D42;
}

.panel-items::-webkit-scrollbar {
    width: 8px;
}

.panel-items::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.2);
    border-radius: 4px;
}

.panel-items::-webkit-scrollbar-track {
    background-color: transparent;
}

.selected-part {
    outline: 2px solid #F81E24;
    outline-offset: 2px;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.filter-btn {
    background: #f0f0f0;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    font-family: PTRootUIRegular, system-ui, sans-serif;
    transition: all 0.2s ease;
    user-select: none;
}

.filter-btn:hover {
    background: #e0e0e0;
    color: #272727;
}

.filter-btn.active {
    background: #26266e;
    color: white;
    border-color: #17172F;
}

.filter-btn.active:hover {
    background: #2a2a4a;
    border-color: #2a2a4a;
}

.scene-parts-panel {
    position: fixed;
    top: 22px;
    left: 22px;
    width: 300px;
    height: 380px;
    background: rgba(255, 255, 255, 0.95);
    padding: 18px 22px;
    border-radius: 12px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(8px);
    border-left: 4px solid #17172F;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    font-family: PTRootUIRegular, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15px;
    line-height: 140%;
    color: #272727;
    z-index: 100;
}

.scene-parts-title {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    color: #17172F;
    text-transform: uppercase;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.scene-parts-list {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

.scene-parts-panel .btn-buy {
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
    margin-top: 40px;
    padding: 14px 20px;
    background-color: #26266e;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: PTRootUIRegular, system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.scene-parts-panel .btn-buy:hover {
    background-color: #F81E24;
    transform: translateY(-1px);
}

.scene-parts-panel .btn-buy:active {
    transform: translateY(0);
}

.scene-part-item {
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 7px 10px;
    background: #f0f0f0;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: default;
}

.scene-part-item:hover {
    background: #e0e0e0;
}

.scene-part-number {
    min-width: 28px;
    font-size: 13px;
    font-weight: 600;
    color: #17172F;
}

.scene-part-name {
    flex: 1;
    font-size: 14px;
    color: #272727;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scene-parts-empty {
    padding: 10px 0;
    text-align: center;
    font-size: 14px;
    color: #999;
}

.scene-parts-list::-webkit-scrollbar {
    width: 8px;
}

.scene-parts-list::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.scene-parts-list::-webkit-scrollbar-track {
    background-color: transparent;
}

.left-panels {
    position: fixed;
    top: 22px;
    left: 22px;
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100;
}

.left-panels .hint-panel {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    box-sizing: border-box;
}

.left-panels .scene-parts-panel {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
}

.scene-part-item {
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.scene-part-item:hover {
    background: rgba(23, 23, 47, 0.08);
}

.scene-part-item.active {
    background: #26266e;
    color: #fff;
    border-color: #17172F;
}

.scene-part-item.active .scene-part-name {
    color: #fff;
}

/* ============================================
   МОДАЛЬНОЕ ОКНО - ОБНОВЛЕННЫЕ СТИЛИ
   ============================================ */

.purchase-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.purchase-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.purchase-modal-overlay {
    position: absolute;
    inset: 0;

    background: rgba(23, 23, 47, 0.6);
    backdrop-filter: blur(8px);
}

.purchase-modal-window {
    position: relative;
    z-index: 1;

    width: calc(100% - 40px);
    max-width: 460px;

    box-sizing: border-box;
    padding: 40px 35px 35px;

    background: #ffffff;
    border-radius: 20px;

    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25), 0 10px 30px rgba(0, 0, 0, 0.1);

    text-align: center;

    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.purchase-modal.active .purchase-modal-window {
    transform: translateY(0) scale(1);
}

.purchase-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;

    width: 36px;
    height: 36px;

    border: none;
    background: rgba(0, 0, 0, 0.05);

    color: #666;
    font-size: 24px;
    line-height: 36px;

    border-radius: 50%;
    cursor: pointer;

    transition: all 0.25s ease;
}

.purchase-modal-close:hover {
    background: rgba(248, 30, 36, 0.1);
    color: #F81E24;
    transform: rotate(90deg);
}

.purchase-modal-icon {
    width: 64px;
    height: 64px;

    margin: 0 auto 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    /* Измененный фон - не красный */
    background: linear-gradient(135deg, rgba(23, 23, 47, 0.1), rgba(23, 23, 47, 0.05));
    border: 2px solid rgba(23, 23, 47, 0.15);

    color: #17172F;

    font-size: 32px;
    font-weight: 700;

    box-sizing: border-box;
}

.purchase-modal-title {
    margin-bottom: 8px;

    color: #17172F;

    font-size: 22px;
    font-weight: 700;
    line-height: 130%;
    font-family: PTRootUIRegular, system-ui, sans-serif;
}

.purchase-modal-text {
    margin-bottom: 28px;

    color: #666;

    font-size: 15px;
    line-height: 150%;
    font-family: PTRootUIRegular, system-ui, sans-serif;
}

/* Кнопки магазинов */
.purchase-modal-shops {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0 28px;
}

.purchase-modal-shop-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 16px 22px;

    background: #f8f8fa;
    border: 2px solid #e8e8ed;
    border-radius: 12px;

    color: #17172F;
    text-decoration: none;

    transition: all 0.3s ease;

    font-size: 16px;
    font-weight: 500;
    font-family: PTRootUIRegular, system-ui, sans-serif;
}

.purchase-modal-shop-btn .shop-name {
    flex: 1;
    text-align: left;
    font-weight: 600;
    color: #17172F;
}

.purchase-modal-shop-btn .shop-arrow {
    color: #999;
    font-size: 20px;
    transition: all 0.3s ease;
}

/* Индивидуальные стили для магазинов */
.purchase-modal-shop-btn[data-shop="lemana"]:hover {
    background: #e8f0fe;
    border-color: #4a8acc;
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(74, 138, 204, 0.15);
}

.purchase-modal-shop-btn[data-shop="lemana"]:hover .shop-arrow {
    color: #4a8acc;
    transform: translateX(4px);
}

.purchase-modal-shop-btn[data-shop="vseinstrumenti"]:hover {
    background: #e8f5e8;
    border-color: #4caf50;
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.15);
}

.purchase-modal-shop-btn[data-shop="vseinstrumenti"]:hover .shop-arrow {
    color: #4caf50;
    transform: translateX(4px);
}

.purchase-modal-shop-btn[data-shop="petrovich"]:hover {
    background: #fef3e8;
    border-color: #e67e22;
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.15);
}

.purchase-modal-shop-btn[data-shop="petrovich"]:hover .shop-arrow {
    color: #e67e22;
    transform: translateX(4px);
}

/* Кнопка "Отмена" */
.purchase-modal-cancel {
    width: 100%;

    padding: 14px 20px;

    border: 2px solid #e8e8ed;
    border-radius: 12px;

    background: transparent;
    color: #666;

    font-family: PTRootUIRegular, system-ui, sans-serif;
    font-size: 15px;
    font-weight: 500;

    cursor: pointer;

    transition: all 0.25s ease;
}

.purchase-modal-cancel:hover {
    background: #f5f5f8;
    border-color: #d0d0d8;
    color: #17172F;
}

.purchase-modal-cancel:active {
    transform: scale(0.98);
}
/* Кнопка "Отмена" - красная */
.purchase-modal-cancel {
    width: 100%;

    padding: 14px 20px;

    border: 2px solid #F81E24;
    border-radius: 12px;

    background: transparent;
    color: #F81E24;

    font-family: PTRootUIRegular, system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    transition: all 0.25s ease;
}

.purchase-modal-cancel:hover {
    background: #F81E24;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(248, 30, 36, 0.3);
}

.purchase-modal-cancel:active {
    transform: scale(0.98);
}