* {
    box-sizing: border-box;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    overflow: hidden;
    font-family: -apple-system, Roboto, "Segoe UI", sans-serif;
    color: #fff;
}

#root {
    position: fixed;
    inset: 0;
}

.hidden {
    display: none !important;
}

.overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
}

.panel {
    width: min(86vw, 460px);
    background: #14161c;
    border: 1px solid #2a2f3a;
    border-radius: 16px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(180deg, #1b1e26, #14161c);
    border-bottom: 1px solid #2a2f3a;
}

.panel-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.panel-close {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 10px;
    background: #232733;
    color: #fff;
    font-size: 22px;
    line-height: 1;
}

.panel-balance {
    padding: 12px 18px;
    color: #c9cfdb;
    font-size: 14px;
}

.panel-balance b {
    color: #ffd15c;
}

.panel-body {
    padding: 8px 18px 18px;
    max-height: 52vh;
    overflow-y: auto;
}

.item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #21252f;
}

.item:last-child {
    border-bottom: none;
}

.item-name {
    font-size: 15px;
}

.item-buy {
    padding: 8px 16px;
    border: none;
    border-radius: 10px;
    background: #ffd15c;
    color: #1a1400;
    font-weight: 700;
    font-size: 14px;
}

.item-buy:active {
    transform: scale(0.96);
}

/* --- тестовая панель --- */
.field {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 10px;
    border: 1px solid #2a2f3a;
    border-radius: 10px;
    background: #0e1015;
    color: #fff;
    font-size: 15px;
    outline: none;
    -webkit-user-select: text;
    user-select: text;
}

.field::placeholder {
    color: #5c6472;
}

.btn-primary {
    width: 100%;
    padding: 13px 16px;
    border: none;
    border-radius: 10px;
    background: #ffd15c;
    color: #1a1400;
    font-weight: 700;
    font-size: 15px;
}

.btn-primary:active {
    transform: scale(0.98);
}

.log {
    margin-top: 12px;
    max-height: 30vh;
    overflow-y: auto;
    font-size: 12px;
    line-height: 1.45;
}

.log-row {
    display: flex;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid #1c2029;
    word-break: break-word;
}

.log-tag {
    flex: 0 0 auto;
    font-weight: 700;
}

.log-out .log-tag {
    color: #ffd15c;
}

.log-in .log-tag {
    color: #6ddc7a;
}

.log-msg {
    color: #c9cfdb;
}

.toast {
    position: fixed;
    left: 50%;
    top: 6%;
    transform: translateX(-50%);
    max-width: 80vw;
    padding: 12px 18px;
    background: rgba(20, 22, 28, 0.92);
    border: 1px solid #2a2f3a;
    border-radius: 12px;
    font-size: 14px;
    text-align: center;
}
