* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--tg-theme-bg-color, #ffffff);
    color: var(--tg-theme-text-color, #000000);
    padding: 0;
    margin: 0;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    margin-bottom: 16px;
}

h1 {
    font-size: 20px;
    margin-bottom: 8px;
}

.summary {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #999);
}

.search-bar {
    margin-bottom: 16px;
}

#searchInput {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--tg-theme-button-color, #3390ec);
    border-radius: 8px;
    font-size: 16px;
    background: var(--tg-theme-bg-color, #fff);
    color: var(--tg-theme-text-color, #000);
}

.lists-container {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 16px;
}

.list-item {
    padding: 12px;
    border-bottom: 1px solid var(--tg-theme-hint-color, #e0e0e0);
    cursor: pointer;
    transition: background 0.2s;
}

.list-item:hover {
    background: var(--tg-theme-secondary-bg-color, #f0f0f0);
}

.list-item.selected {
    background: var(--tg-theme-button-color, #3390ec);
    color: var(--tg-theme-button-text-color, #fff);
}

.list-item label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    gap: 12px;
}

.list-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
}

.list-content {
    flex: 1;
}

.list-name {
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
}

.list-desc {
    font-size: 12px;
    opacity: 0.7;
    display: block;
}

.list-item.selected .list-desc {
    opacity: 0.9;
}

.save-button {
    width: 100%;
    padding: 16px;
    background: var(--tg-theme-button-color, #3390ec);
    color: var(--tg-theme-button-text-color, #fff);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.save-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.loading, .error, .no-results {
    text-align: center;
    padding: 40px;
    color: var(--tg-theme-hint-color, #999);
}
