:root {
    --bg: #fff;
    --surface: #f7f7f7;
    --border: #ddd;
    --muted: #eee;
    --text: #000;
}

#bot-app {
    max-width: 900px;
    margin: 0 auto;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.05);
}

#bot-picker,
#bot-drop,
#bot-list {
    margin-top: 16px;
}

.bot-row {
    position: relative;
    border: 1px solid var(--border);
    margin: 12px 0;
    padding: 14px;
    border-radius: 10px;
    background: var(--bg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.bot-row-header {
    display: grid;
    grid-template-columns: minmax(120px, 30%) 1fr;
    gap: 16px;
    position: relative;
    align-items: start;
}

.bot-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.bot-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bot-summary {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bot-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.bot-remove {
    position: absolute;
    top: 6px;
    right: 12px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 160ms ease;
}

.bot-remove:hover {
    transform: scale(1.15);
}

.bot-simple-card {
    display: inline-flex;
    flex-direction: column;
    gap: 8px;
    max-width: 180px;
    padding: 12px;
    border: 1px solid var(--muted);
    border-radius: 10px;
    background: #fff;
}

.bot-simple-card label {
    font-size: 0.95rem;
    color: var(--text);
}

.bot-simple-card input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--muted);
    border-radius: 8px;
}

.bot-body {
    margin-top: 12px;
}

.bot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.bot-cell {
    border: 1px solid var(--muted);
    padding: 10px 8px;
    border-radius: 10px;
    text-align: center;
    background: #fff;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bot-cell input {
    width: 100%;
    margin-top: 8px;
    padding: 6px 8px;
    border: 1px solid var(--muted);
    border-radius: 8px;
    font-size: 0.95rem;
}

.bot-total {
    margin-top: 10px;
    text-align: right;
    font-weight: 600;
    color: var(--text);
}

.loader {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    width: 52px;
    height: 52px;
    background-color: var(--muted);
    border-radius: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 160ms ease, visibility 160ms ease;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 4px solid #ccc;
    border-top: 4px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.main_button,
.add_button {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    padding: 10px 14px;
    cursor: pointer;
    transition: border-color 160ms ease, color 160ms ease;
}

.main_button:hover,
.add_button:hover {
    background: transparent;
    border-bottom: 2px solid #000;
    color: var(--text);
}

.main_button {
    font-weight: 600;
}

.bot-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}

.bot-item span {
    flex: 1;
}

#bot-drop {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    padding: 18px;
    border: 2px dashed var(--border);
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    text-align: center;
}

#bot-drop input {
    display: none;
}

#bot-load,
#bot-save,
#bot-checkout,
#bot-toggle {
    min-width: 135px;
}
