body {
    margin: 0;
    padding: 0;
    background: url('images/background.jpg') no-repeat center center fixed;
    background-size: cover;
    overflow-x: hidden;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.glass {
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(8px);
    min-height: 100vh;
    padding: 40px 0 0 0;
    width: 100vw;
}

.cases-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0 auto 40px auto;
    padding: 0 24px;
}

.case-row {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.08);
    border-radius: 16px;
    min-height: 120px;
    padding: 20px 28px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.2);
    gap: 24px;
    transition: box-shadow 0.2s, transform 0.2s;
}
.case-row:hover {
    box-shadow: 0 6px 32px rgba(0,0,0,0.25);
    transform: translateY(-2px) scale(1.01);
}

.case-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    background: #222;
    border: 2px solid #444;
    flex-shrink: 0;
}

.case-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    color: #f0f0f0;
    font-size: 17px;
}
.case-name {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 6px;
    color: #fff;
    border-bottom: 1px #cccccc57 solid;
}
.case-stats {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0 18px;
    margin-top: 2px;
}
.case-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 80px;
}
.case-stat:not(:last-child) {
    border-right: 1.5px solid #cccccc57;
    padding-right: 12px;
}
.case-stat-label {
    font-size: 13px;
    color: #b0b0b0;
    margin-bottom: 2px;
}
.case-stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
}
.update-btn {
    background: #222;
    color: #fff;
    border: 1px solid #555;
    border-radius: 8px;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
    margin-left: 18px;
    align-self: flex-start;
}
.update-btn:hover {
    background: #444;
}

/* Кнопка добавления кейса */
.add-case-btn {
    position: fixed;
    right: 32px;
    bottom: 32px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #232526 0%, #414345 100%);
    color: #fff;
    font-size: 38px;
    border: none;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4), 0 0 0 0 #00ffd0;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, box-shadow 0.2s, filter 0.2s;
    filter: drop-shadow(0 0 6px #00ffd0aa);
}
.add-case-btn:hover {
    background: linear-gradient(135deg, #444 0%, #232526 100%);
    box-shadow: 0 6px 32px rgba(0,0,0,0.5), 0 0 16px 2px #00ffd0;
    filter: drop-shadow(0 0 16px #00ffd0);
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1002;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(20, 20, 20, 0.75);
    backdrop-filter: blur(2px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.modal.show {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background: #232526;
    color: #fff;
    padding: 32px 28px 24px 28px;
    border-radius: 18px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.5);
    min-width: 320px;
    max-width: 90vw;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: modalPop 0.35s cubic-bezier(.23,1.12,.62,1.01);
}
@keyframes modalPop {
    0% { transform: scale(0.85) translateY(40px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-content h2 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 24px;
    text-align: center;
}
.modal-content label {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
    font-size: 16px;
    color: #e0e0e0;
}
.modal-content input {
    margin-top: 6px;
    padding: 8px 10px;
    border-radius: 7px;
    border: 1px solid #444;
    background: #18191a;
    color: #fff;
    font-size: 16px;
    margin-bottom: 4px;
    transition: border 0.2s, box-shadow 0.2s;
}
.modal-content input:focus {
    border: 1.5px solid #00ffd0;
    outline: none;
    box-shadow: 0 0 6px #00ffd0;
}
.modal-save-btn {
    background: #444;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 0;
    font-size: 18px;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s;
}
.modal-save-btn:hover {
    background: #666;
}
.close {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 28px;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}
.close:hover {
    color: #fff;
}

/* Уведомление */
.toast {
    position: fixed;
    bottom: 110px;
    right: 40px;
    background: linear-gradient(135deg, #232526 0%, #00ffd0 100%);
    color: #232526;
    padding: 18px 32px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 500;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateY(30px);
}
.toast.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.editable {
    position: relative;
    cursor: pointer;
    min-width: 60px;
}
.editable input {
    position: absolute;
    left: 0; top: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    color: #fff;
    border: none;
    outline: none;
    font-size: 18px;
    font-weight: 600;
    padding: 0;
    margin: 0;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.15s;
    pointer-events: none;
}
.editable.editing input {
    opacity: 1;
    pointer-events: auto;
    background: rgba(30,30,30,0.7);
    border-bottom: 1.5px solid #00ffd0;
    border-radius: 3px;
}
.editable .edit-value {
    z-index: 1;
    position: relative;
}
.editable.editing .edit-value {
    opacity: 0.2;
}

/* Скрыть стрелки у input[type=number] */
.editable input[type=number]::-webkit-inner-spin-button,
.editable input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.editable input[type=number] {
    -moz-appearance: textfield;
}

.connect-parser {
    color: #00ffd0;
    text-decoration: underline dotted;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.2s;
}
.connect-parser:hover {
    color: #fff;
    text-decoration: underline;
}

@media (max-width: 900px) {
    .case-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px 18px;
    }
    .case-stat {
        border-right: none !important;
        padding-right: 0 !important;
    }
    .case-stat:nth-child(odd) {
        border-right: 1.5px solid #333;
        padding-right: 12px;
    }
}
